Skip to content

Commit 0f80004

Browse files
osyo-mangast0012
andauthored
Add kill-word and backward-kill-word keymapping support. (#570)
Fix it #558 Co-authored-by: Stan Lo <stan001212@gmail.com>
1 parent dc5a1b7 commit 0f80004

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/reline/line_editor.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,6 +2696,7 @@ def finish
26962696
@cursor_max -= width
26972697
end
26982698
end
2699+
alias_method :kill_word, :em_delete_next_word
26992700

27002701
private def ed_delete_prev_word(key)
27012702
if @byte_pointer > 0
@@ -2707,6 +2708,7 @@ def finish
27072708
@cursor_max -= width
27082709
end
27092710
end
2711+
alias_method :backward_kill_word, :ed_delete_prev_word
27102712

27112713
private def ed_transpose_chars(key)
27122714
if @byte_pointer > 0

0 commit comments

Comments
 (0)