File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,21 @@ class ConfigEncodingConversionError < StandardError; end
18
18
19
19
Key = Struct . new ( 'Key' , :char , :combined_char , :with_meta ) do
20
20
def match? ( key )
21
- ( key . char . nil? or char . nil? or char == key . char ) and
22
- ( key . combined_char . nil? or combined_char . nil? or combined_char == key . combined_char ) and
23
- ( key . with_meta . nil? or with_meta . nil? or with_meta == key . with_meta )
21
+ if key . instance_of? ( Reline ::Key )
22
+ ( key . char . nil? or char . nil? or char == key . char ) and
23
+ ( key . combined_char . nil? or combined_char . nil? or combined_char == key . combined_char ) and
24
+ ( key . with_meta . nil? or with_meta . nil? or with_meta == key . with_meta )
25
+ elsif key . is_a? ( Integer )
26
+ if not combined_char . nil? and combined_char == key
27
+ true
28
+ elsif not char . nil? and char == key
29
+ true
30
+ else
31
+ false
32
+ end
33
+ else
34
+ false
35
+ end
24
36
end
25
37
end
26
38
CursorPos = Struct . new ( :x , :y )
You can’t perform that action at this time.
0 commit comments