mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
[ruby/reline] Add kill-word
and backward-kill-word
keymapping
support.
(https://github.com/ruby/reline/pull/570)
Fix it
https://github.com/ruby/reline/issues/558
0f8000443e
Co-authored-by: Stan Lo <stan001212@gmail.com>
This commit is contained in:
parent
e78af6b82d
commit
ccca097cb5
1 changed files with 2 additions and 0 deletions
|
@ -2696,6 +2696,7 @@ class Reline::LineEditor
|
||||||
@cursor_max -= width
|
@cursor_max -= width
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
alias_method :kill_word, :em_delete_next_word
|
||||||
|
|
||||||
private def ed_delete_prev_word(key)
|
private def ed_delete_prev_word(key)
|
||||||
if @byte_pointer > 0
|
if @byte_pointer > 0
|
||||||
|
@ -2707,6 +2708,7 @@ class Reline::LineEditor
|
||||||
@cursor_max -= width
|
@cursor_max -= width
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
alias_method :backward_kill_word, :ed_delete_prev_word
|
||||||
|
|
||||||
private def ed_transpose_chars(key)
|
private def ed_transpose_chars(key)
|
||||||
if @byte_pointer > 0
|
if @byte_pointer > 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue