Skip to content

Commit

Permalink
Add kill-word and backward-kill-word keymapping support. (#570)
Browse files Browse the repository at this point in the history
Fix it
#558

Co-authored-by: Stan Lo <stan001212@gmail.com>
  • Loading branch information
osyo-manga and st0012 authored Jul 27, 2023
1 parent dc5a1b7 commit 0f80004
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 0f80004

Please sign in to comment.