From ccca097cb54e3c23fb2e9a83dacfffa84acdcad8 Mon Sep 17 00:00:00 2001 From: osyo-manga Date: Thu, 27 Jul 2023 18:08:20 +0900 Subject: [PATCH] [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 --- lib/reline/line_editor.rb | 2 ++ 1 file changed, 2 insertions(+) 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