[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

https://github.com/ruby/reline/commit/0f8000443e

Co-authored-by: Stan Lo <stan001212@gmail.com>
This commit is contained in:
osyo-manga 2023-07-27 18:08:20 +09:00 committed by git
parent e78af6b82d
commit ccca097cb5

View File

@ -2696,6 +2696,7 @@ class Reline::LineEditor
@cursor_max -= width
end
end
alias_method :kill_word, :em_delete_next_word
private def ed_delete_prev_word(key)
if @byte_pointer > 0
@ -2707,6 +2708,7 @@ class Reline::LineEditor
@cursor_max -= width
end
end
alias_method :backward_kill_word, :ed_delete_prev_word
private def ed_transpose_chars(key)
if @byte_pointer > 0