ruby-changes:68116
From: aycabta <ko1@a...>
Date: Sat, 25 Sep 2021 00:12:00 +0900 (JST)
Subject: [ruby-changes:68116] f726c79d74 (master): [ruby/reline] Add aliases {prev, next}_history to ed_{prev, next}_history
https://git.ruby-lang.org/ruby.git/commit/?id=f726c79d74 From f726c79d7489c09615b37f74eb747cf64876a643 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Mon, 20 Sep 2021 23:44:01 +0900 Subject: [ruby/reline] Add aliases {prev,next}_history to ed_{prev,next}_history https://github.com/ruby/reline/commit/d740e18cff --- lib/reline/line_editor.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 6555103..c7d6ff4 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -2409,6 +2409,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L2409 arg -= 1 ed_prev_history(key, arg: arg) if arg > 0 end + alias_method :previous_history, :ed_prev_history private def ed_next_history(key, arg: 1) if @is_multiline and @line_index < (@buffer_of_lines.size - 1) @@ -2456,6 +2457,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L2457 arg -= 1 ed_next_history(key, arg: arg) if arg > 0 end + alias_method :next_history, :ed_next_history private def ed_newline(key) process_insert(force: true) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/