ruby-changes:60822
From: aycabta <ko1@a...>
Date: Sat, 18 Apr 2020 23:13:29 +0900 (JST)
Subject: [ruby-changes:60822] 08c1c3f220 (master): [ruby/reline] Use vi_search_{prev, next} to incremental search
https://git.ruby-lang.org/ruby.git/commit/?id=08c1c3f220 From 08c1c3f2203592c219c6068ea05fb5d583493a25 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Wed, 15 Apr 2020 02:23:24 +0900 Subject: [ruby/reline] Use vi_search_{prev,next} to incremental search https://github.com/ruby/reline/commit/cab312f584 diff --git a/lib/reline/key_actor/emacs.rb b/lib/reline/key_actor/emacs.rb index 3886d17..1e51d4f 100644 --- a/lib/reline/key_actor/emacs.rb +++ b/lib/reline/key_actor/emacs.rb @@ -37,9 +37,9 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base https://github.com/ruby/ruby/blob/trunk/lib/reline/key_actor/emacs.rb#L37 # 17 ^Q :ed_quoted_insert, # 18 ^R - :ed_search_prev_history, + :vi_search_prev, # 19 ^S - :ed_search_next_history, + :vi_search_next, # 20 ^T :ed_transpose_chars, # 21 ^U @@ -413,11 +413,11 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base https://github.com/ruby/ruby/blob/trunk/lib/reline/key_actor/emacs.rb#L413 # 205 M-M :ed_unassigned, # 206 M-N - :ed_search_next_history, + :vi_search_next, # 207 M-O :ed_sequence_lead_in, # 208 M-P - :ed_search_prev_history, + :vi_search_prev, # 209 M-Q :ed_unassigned, # 210 M-R @@ -477,11 +477,11 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base https://github.com/ruby/ruby/blob/trunk/lib/reline/key_actor/emacs.rb#L477 # 237 M-m :ed_unassigned, # 238 M-n - :ed_search_next_history, + :vi_search_next, # 239 M-o :ed_unassigned, # 240 M-p - :ed_search_prev_history, + :vi_search_prev, # 241 M-q :ed_unassigned, # 242 M-r diff --git a/lib/reline/key_actor/vi_command.rb b/lib/reline/key_actor/vi_command.rb index 865dfa2..54b4a60 100644 --- a/lib/reline/key_actor/vi_command.rb +++ b/lib/reline/key_actor/vi_command.rb @@ -37,7 +37,7 @@ class Reline::KeyActor::ViCommand < Reline::KeyActor::Base https://github.com/ruby/ruby/blob/trunk/lib/reline/key_actor/vi_command.rb#L37 # 17 ^Q :ed_ignore, # 18 ^R - :ed_search_prev_history, + :vi_search_prev, # 19 ^S :ed_ignore, # 20 ^T @@ -151,7 +151,7 @@ class Reline::KeyActor::ViCommand < Reline::KeyActor::Base https://github.com/ruby/ruby/blob/trunk/lib/reline/key_actor/vi_command.rb#L151 # 74 J :vi_join_lines, # 75 K - :ed_search_prev_history, + :vi_search_prev, # 76 L :ed_unassigned, # 77 M diff --git a/lib/reline/key_actor/vi_insert.rb b/lib/reline/key_actor/vi_insert.rb index 06e94a9..b8e89f8 100644 --- a/lib/reline/key_actor/vi_insert.rb +++ b/lib/reline/key_actor/vi_insert.rb @@ -37,9 +37,9 @@ class Reline::KeyActor::ViInsert < Reline::KeyActor::Base https://github.com/ruby/ruby/blob/trunk/lib/reline/key_actor/vi_insert.rb#L37 # 17 ^Q :ed_ignore, # 18 ^R - :ed_search_prev_history, + :vi_search_prev, # 19 ^S - :ed_search_next_history, + :vi_search_next, # 20 ^T :ed_insert, # 21 ^U diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 0a72de1..7097a3d 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1411,15 +1411,15 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1411 } end - private def ed_search_prev_history(key) + private def vi_search_prev(key) incremental_search_history(key) end - alias_method :reverse_search_history, :ed_search_prev_history + alias_method :reverse_search_history, :vi_search_prev - private def ed_search_next_history(key) + private def vi_search_next(key) incremental_search_history(key) end - alias_method :forward_search_history, :ed_search_next_history + alias_method :forward_search_history, :vi_search_next private def ed_prev_history(key, arg: 1) if @is_multiline and @line_index > 0 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/