reline 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7094a7af234fede8c3b7a691066f57e68c8f7873ec8d18aeea7c9416f18958d
4
- data.tar.gz: 7fad4ae701cdb34dcb22dd07428c3719672cc68ffa61b0bfbe005ae6326b4027
3
+ metadata.gz: 9b325efda8753fa1ecea3b1dabfd685416016ee334876673bf0d965c3a02095d
4
+ data.tar.gz: 4b22612ebce12cc96593f98535bfb9223eebbded388931ccbd8bbdb4d13ce1d1
5
5
  SHA512:
6
- metadata.gz: 8fcbaaa70d79beef33e8ff8150a693c640212b085f4622d1b8acf5aa2a5b742be32acb2076ef844a24f3566b623f7d3522ce01147caa30c79e61a86dee53307a
7
- data.tar.gz: dbadec0e7d7604239f213ac91a1a32398700cd514629f41d1d513713fd03147d1beec830f2160e09c782fa0fd7708727732a556c0c07a9957fecf8c3565b0d53
6
+ metadata.gz: 29f19adce6163f38399da6119c3605039593d244c7119d601b413279a678cd87a5ad5eba5679f2ea7ccc1bdf7b4743987b2840cf4c0f69fa316c0d2fa84b5f45
7
+ data.tar.gz: be0b1ad84d01936ff721b3a18f196d0ee19817da6baf9200e4e6a96681e4b87594c55d1aa71071fcda63f35c4c8d0aefa7aa7a016c62c538d165e19f82e7d3b8
data/lib/reline/ansi.rb CHANGED
@@ -3,6 +3,8 @@ require 'io/wait'
3
3
  require_relative 'terminfo'
4
4
 
5
5
  class Reline::ANSI
6
+ RESET_COLOR = "\e[0m"
7
+
6
8
  CAPNAME_KEY_BINDINGS = {
7
9
  'khome' => :ed_move_to_beg,
8
10
  'kend' => :ed_move_to_end,
@@ -1,6 +1,8 @@
1
1
  require 'io/wait'
2
2
 
3
3
  class Reline::GeneralIO
4
+ RESET_COLOR = '' # Do not send color reset sequence
5
+
4
6
  def self.reset(encoding: nil)
5
7
  @@pasting = false
6
8
  if encoding
@@ -57,7 +59,7 @@ class Reline::GeneralIO
57
59
  end
58
60
 
59
61
  def self.get_screen_size
60
- [1, 1]
62
+ [24, 80]
61
63
  end
62
64
 
63
65
  def self.cursor_pos
@@ -100,14 +102,6 @@ class Reline::GeneralIO
100
102
  @@pasting
101
103
  end
102
104
 
103
- def self.start_pasting
104
- @@pasting = true
105
- end
106
-
107
- def self.finish_pasting
108
- @@pasting = false
109
- end
110
-
111
105
  def self.prep
112
106
  end
113
107
 
@@ -68,7 +68,7 @@ class Reline::KillRing
68
68
  def append(string, before_p = false)
69
69
  case @state
70
70
  when State::FRESH, State::YANK
71
- @ring << RingPoint.new(string)
71
+ @ring << RingPoint.new(+string)
72
72
  @state = State::CONTINUED
73
73
  when State::CONTINUED, State::PROCESSED
74
74
  if before_p