Skip to content

Commit

Permalink
Add aliases {prev,next}_history to ed_{prev,next}_history
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Sep 20, 2021
1 parent cbacb4c commit d740e18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2409,6 +2409,7 @@ def finish
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)
Expand Down Expand Up @@ -2456,6 +2457,7 @@ def finish
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)
Expand Down

0 comments on commit d740e18

Please sign in to comment.