Skip to content

Commit

Permalink
zle: don't override kill-word and backward-kill-word
Browse files Browse the repository at this point in the history
Otherwise, we can't do `echo hello hello^W^W^Y` and get back `echo hello
hello` (we get `echo hello` instead because ZLE doesn't detect two
consecutive calls to backward-kill-word).

I don't add more to this commit because other `*-kill-*` are less likely
to be used twice in a row when working with the shell. But maybe,
`kill-line` could be added too.

Closes zsh-users#150.
  • Loading branch information
vincentbernat committed Feb 5, 2015
1 parent 3dc5741 commit 77c8651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zsh-syntax-highlighting.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ _zsh_highlight_bind_widgets()

# Override ZLE widgets to make them invoke _zsh_highlight.
local cur_widget
for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep|yank*)}; do
for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep|yank*|backward-kill-word|kill-word)}; do
case $widgets[$cur_widget] in

# Already rebound event: do nothing.
Expand Down

0 comments on commit 77c8651

Please sign in to comment.