ruby-changes:57666
From: aycabta <ko1@a...>
Date: Sun, 8 Sep 2019 03:27:35 +0900 (JST)
Subject: [ruby-changes:57666] e9bc8b35c6 (master): Behave ESC key correctly when vi command mode
https://git.ruby-lang.org/ruby.git/commit/?id=e9bc8b35c6 From e9bc8b35c6c860e227627e3b0aab86b4f51c59af Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Sun, 8 Sep 2019 03:26:09 +0900 Subject: Behave ESC key correctly when vi command mode diff --git a/lib/reline/key_actor/vi_command.rb b/lib/reline/key_actor/vi_command.rb index 5a56fe5..d3929d6 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 https://github.com/ruby/ruby/blob/trunk/lib/reline/key_actor/vi_command.rb#L55 # 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 597a391..2e964cb 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1049,6 +1049,8 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1049 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/