Skip to content

Commit

Permalink
[ruby/reline] Add kill-word and backward-kill-word keymapping
Browse files Browse the repository at this point in the history
support.
(ruby/reline#570)

Fix it
ruby/reline#558

ruby/reline@0f8000443e

Co-authored-by: Stan Lo <stan001212@gmail.com>
  • Loading branch information
2 people authored and matzbot committed Jul 27, 2023
1 parent e78af6b commit ccca097
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2696,6 +2696,7 @@ def finish
@cursor_max -= width
end
end
alias_method :kill_word, :em_delete_next_word

private def ed_delete_prev_word(key)
if @byte_pointer > 0
Expand All @@ -2707,6 +2708,7 @@ def finish
@cursor_max -= width
end
end
alias_method :backward_kill_word, :ed_delete_prev_word

private def ed_transpose_chars(key)
if @byte_pointer > 0
Expand Down

0 comments on commit ccca097

Please sign in to comment.