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

Behave ESC key correctly when vi command mode

This commit is contained in:
aycabta 2019-09-08 03:26:09 +09:00
parent 46bfe907f1
commit e9bc8b35c6
2 changed files with 3 additions and 1 deletions

View file

@ -55,7 +55,7 @@ class Reline::KeyActor::ViCommand < Reline::KeyActor::Base
# 26 ^Z
:ed_unassigned,
# 27 ^[
:em_meta_next,
:ed_unassigned,
# 28 ^\
:ed_ignore,
# 29 ^]

View file

@ -1049,6 +1049,8 @@ class Reline::LineEditor
end
end
private def ed_unassigned(key) end # do nothing
private def ed_insert(key)
if key.instance_of?(String)
width = Reline::Unicode.get_mbchar_width(key)