1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Emulate Unix like terminals that sends Alt+key as \e+key

https://github.com/ruby/reline/commit/dc2cf90fa6
This commit is contained in:
aycabta 2021-09-03 03:30:36 +09:00 committed by git
parent 9e0caba187
commit 057ab5f056

View file

@ -226,6 +226,8 @@ class Reline::Windows
# no char, only control keys
return if key.char_code == 0 and key.control_keys.any?
@@output_buf.push("\e".ord) if key.control_keys.include?(:ALT)
@@output_buf.concat(key.char.bytes)
end