Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kill-word and backward-kill-word keymapping support. #570

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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