diff options
author | aycabta <aycabta@gmail.com> | 2019-06-02 05:07:04 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-06-02 05:07:13 +0900 |
commit | 7b1c1b949201b5ebe5be597ec27317ea6e9f0841 (patch) | |
tree | 0a5b29ef3b35c4b19e6da4eb4b5875dc744f28d2 /lib | |
parent | 4b9869e7e04cbfb581f6f1b21ae17b310135c5e2 (diff) |
Suppress error of macro not found
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reline/line_editor.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 6abef1a8d8..3fb4480990 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -647,7 +647,11 @@ class Reline::LineEditor else method_obj = nil end - if @vi_arg + if method_symbol and key.is_a?(Symbol) + method_obj&.(key, arg: @vi_arg) + @kill_ring.process + @vi_arg = nil + elsif @vi_arg if key.chr =~ /[0-9]/ ed_argument_digit(key) else @@ -684,6 +688,10 @@ class Reline::LineEditor private def normal_char(key) method_symbol = method_obj = nil + if key.combined_char.is_a?(Symbol) + process_key(key.combined_char, key.combined_char) + return + end @multibyte_buffer << key.combined_char if @multibyte_buffer.size > 1 if @multibyte_buffer.dup.force_encoding(@encoding).valid_encoding? |