mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Add aliases {prev,next}_history to ed_{prev,next}_history
d740e18cff
This commit is contained in:
parent
ff26c60bc1
commit
f726c79d74
1 changed files with 2 additions and 0 deletions
|
@ -2409,6 +2409,7 @@ class Reline::LineEditor
|
|||
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
|
|||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue