mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Implement vi_kill_line_prev
This operation is mentioned and bound to `^U` in both `vi_command.rb`
and `vi_insert.rb`, but there is no definition of it.
Both Vi and Emacs use the same keystroke to do the same behavior, so
I've chosen to use `alias_method` to make the implementation small,
rather than duplicating the method and re-implementing it.
fdbfc8669f
This commit is contained in:
parent
389de6f052
commit
3f7b08d2cb
1 changed files with 1 additions and 0 deletions
|
@ -2540,6 +2540,7 @@ class Reline::LineEditor
|
|||
end
|
||||
end
|
||||
alias_method :kill_line, :em_kill_line
|
||||
alias_method :vi_kill_line_prev, :em_kill_line
|
||||
|
||||
private def em_delete(key)
|
||||
if (not @is_multiline and @line.empty?) or (@is_multiline and @line.empty? and @buffer_of_lines.size == 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue