mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Support Meta key in Reline
This commit is contained in:
parent
2d34087a38
commit
eb4e774711
11 changed files with 282 additions and 217 deletions
|
|
@ -40,13 +40,13 @@ class Reline::TestCase < Test::Unit::TestCase
|
|||
eighth_bit = 0b10000000
|
||||
byte = c.bytes.first
|
||||
if byte.allbits?(eighth_bit)
|
||||
@line_editor.input_key("\e".ord)
|
||||
byte ^= eighth_bit
|
||||
@line_editor.input_key(Reline::Key.new(byte ^ eighth_bit, byte, true))
|
||||
else
|
||||
@line_editor.input_key(Reline::Key.new(byte, byte, false))
|
||||
end
|
||||
@line_editor.input_key(byte)
|
||||
else
|
||||
c.bytes.each do |b|
|
||||
@line_editor.input_key(b)
|
||||
@line_editor.input_key(Reline::Key.new(b, b, false))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue