summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-09-08 03:26:09 +0900
committeraycabta <aycabta@gmail.com>2019-09-08 03:26:35 +0900
commite9bc8b35c6c860e227627e3b0aab86b4f51c59af (patch)
treebf183269e2ae7baecbe5d62a2507c70a6511cd3d
parent46bfe907f1d61217215bcd1a7da9dff258c63294 (diff)
Behave ESC key correctly when vi command mode
-rw-r--r--lib/reline/key_actor/vi_command.rb2
-rw-r--r--lib/reline/line_editor.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/reline/key_actor/vi_command.rb b/lib/reline/key_actor/vi_command.rb
index 5a56fe5694..d3929d6b99 100644
--- a/lib/reline/key_actor/vi_command.rb
+++ b/lib/reline/key_actor/vi_command.rb
@@ -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 ^]
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 597a39107b..2e964cb74a 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -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)