diff options
| author | osyo-manga <manga.osyo@gmail.com> | 2023-07-27 18:08:20 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-07-27 09:08:24 +0000 |
| commit | ccca097cb54e3c23fb2e9a83dacfffa84acdcad8 (patch) | |
| tree | be05279fa808cd41ee268d3caaca8bbbf6a5e2f8 | |
| parent | e78af6b82df6cf6f2c6ac857fa408dad2f1c52d5 (diff) | |
[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>
| -rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index eb576507e2..0d990c2c0a 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -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 |
