From 766b350a7d346374e8945a0644825953fc202181 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Mon, 19 Oct 2015 08:30:11 +0000 Subject: [PATCH] Wrap yank-pop. As explained in #143 (which was a PR for #99), 'yank-pop' only works when the previous widget has the ZLE_YANK flag, which means wrapping the 'yank' widget breaks the 'yank-pop' widget (makes it a no-op). However, that is a reason against wrapping the 'yank' widget, but not against wrapping the 'yank-pop' widget. Indeed, if 'yank-pop' is wrapped but 'yank' isn't, then yank-pop functions correctly and updates highlighting properly. To unbreak yank-pop, either 'yank' should be excluded from wrapping, or one of the fixes mentioned on issue #183 should be applied. --- zsh-syntax-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index a65b29f..810bb54 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -182,7 +182,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-pop|set-local-history)}; do + for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep|set-local-history)}; do case $widgets[$cur_widget] in # Already rebound event: do nothing.