Skip to content

Commit 179c788

Browse files
Revert "Call backward-kill-word instead of unix-word-rubout when C-w has been pressed."
This reverts commit 7ea3f44. We shouldn't have done this. See: #426
1 parent d87978a commit 179c788

File tree

1 file changed

+3
-4
lines changed
  • prompt_toolkit/key_binding/bindings

1 file changed

+3
-4
lines changed

prompt_toolkit/key_binding/bindings/basic.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,9 @@ def _(event):
134134
handle('c-i', filter=insert_mode)(get_by_name('menu-complete'))
135135
handle('s-tab', filter=insert_mode)(get_by_name('menu-complete-backward'))
136136

137-
# Control-W is bind to "unix-word-rubout" in readline by default, but
138-
# we bind it to backward-kill-word, because this uses word instead of
139-
# WORD characters as separators.
140-
handle('c-w', filter=insert_mode)(get_by_name('backward-kill-word'))
137+
# Control-W should delete, using whitespace as separator, while M-Del
138+
# should delete using [^a-zA-Z0-9] as a boundary.
139+
handle('c-w', filter=insert_mode)(get_by_name('unix-word-rubout'))
141140

142141
handle('pageup', filter= ~has_selection)(get_by_name('previous-history'))
143142
handle('pagedown', filter= ~has_selection)(get_by_name('next-history'))

0 commit comments

Comments
 (0)