yap-rawline 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rawline/completer.rb +9 -15
- data/lib/rawline/history_buffer.rb +1 -1
- data/lib/rawline/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc11681274f5b951af403e11a4af120550c7751a
|
4
|
+
data.tar.gz: a47390374ffbacf2881d6f93d2ea624767ba0f2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee26993157c86d07722228de7bb1e170c76cefbff92d631b1838fc9d12d16cb76f15485eb65e45495f5591baa70071048f0b20d004b4c7013ea275ecfa80c386
|
7
|
+
data.tar.gz: 9c717d3e9bd914f6bbe0c3df537e2e3dd6e2b453948f42706294f19371a562a4b9f0479d555468b18d98f30efafa706c11eeabf0adee8696fe2b7138bb57cabb
|
data/lib/rawline/completer.rb
CHANGED
@@ -87,11 +87,11 @@ module RawLine
|
|
87
87
|
Treefell['editor'].puts "completer, more than one possible completion"
|
88
88
|
|
89
89
|
# Get first match
|
90
|
-
@completion_matches.
|
90
|
+
@completion_matches.forward
|
91
91
|
match = @completion_matches.get
|
92
92
|
|
93
|
-
Treefell['editor'].puts "completer: first completion: #{match} possible: #{
|
94
|
-
@completion_found_proc.call(completion: match, possible_completions:
|
93
|
+
Treefell['editor'].puts "completer: first completion: #{match} possible: #{@completion_matches.inspect}"
|
94
|
+
@completion_found_proc.call(completion: match, possible_completions: @completion_matches)
|
95
95
|
end
|
96
96
|
|
97
97
|
def handle_no_completions
|
@@ -102,12 +102,6 @@ module RawLine
|
|
102
102
|
@done_proc.call
|
103
103
|
end
|
104
104
|
|
105
|
-
def possible_completions
|
106
|
-
# completion matches is a history implementation and its in reverse order from what
|
107
|
-
# a user would expect
|
108
|
-
@completion_matches.reverse
|
109
|
-
end
|
110
|
-
|
111
105
|
def resize(matches)
|
112
106
|
if matches.any?
|
113
107
|
@completion_matches.resize(matches.length)
|
@@ -116,19 +110,19 @@ module RawLine
|
|
116
110
|
end
|
117
111
|
|
118
112
|
def select_next
|
119
|
-
@completion_matches.
|
113
|
+
@completion_matches.forward
|
120
114
|
match = @completion_matches.get
|
121
115
|
|
122
|
-
Treefell['editor'].puts "completer, selecting next match=#{match.inspect} possible_completions=#{
|
123
|
-
@completion_found_proc.call(completion: match, possible_completions:
|
116
|
+
Treefell['editor'].puts "completer, selecting next match=#{match.inspect} possible_completions=#{@completion_matches.inspect}"
|
117
|
+
@completion_found_proc.call(completion: match, possible_completions: @completion_matches)
|
124
118
|
end
|
125
119
|
|
126
120
|
def select_previous
|
127
|
-
@completion_matches.
|
121
|
+
@completion_matches.back
|
128
122
|
match = @completion_matches.get
|
129
123
|
|
130
|
-
Treefell['editor'].puts "completer, selecting previous match=#{match.inspect} possible_completions=#{
|
131
|
-
@completion_found_proc.call(completion: match, possible_completions:
|
124
|
+
Treefell['editor'].puts "completer, selecting previous match=#{match.inspect} possible_completions=#{@completion_matches.inspect}"
|
125
|
+
@completion_found_proc.call(completion: match, possible_completions: @completion_matches)
|
132
126
|
end
|
133
127
|
end
|
134
128
|
end
|
data/lib/rawline/version.rb
CHANGED