Skip to content

Commit

Permalink
[ruby/reline] Move alias_method to right after original definition
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Dec 4, 2020
1 parent 9750c27 commit 4874261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Expand Up @@ -1229,6 +1229,7 @@ def finish
arg -= 1
ed_prev_char(key, arg: arg) if arg > 0
end
alias_method :backward_char, :ed_prev_char

private def vi_first_print(key)
@byte_pointer, @cursor = Reline::Unicode.vi_first_print(@line)
Expand Down Expand Up @@ -1956,7 +1957,6 @@ def finish
ed_prev_char(key)
@config.editing_mode = :vi_command
end
alias_method :backward_char, :ed_prev_char

private def vi_next_word(key, arg: 1)
if @line.bytesize > @byte_pointer
Expand Down

0 comments on commit 4874261

Please sign in to comment.