From 186d80054a40262b9db967aeaf483a28027de19f Mon Sep 17 00:00:00 2001 From: Julien Nicoulaud Date: Tue, 2 Aug 2011 20:25:00 +0200 Subject: [PATCH] Fix #65, sourcing the script multiples times should not cause issues anymore --- zsh-syntax-highlighting.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index a7122b3..7e9c3b4 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -133,11 +133,11 @@ _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)}; do + for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep)}; do case $widgets[$cur_widget] in # Already rebound event: do nothing. - user:$cur_widget);; + user:$cur_widget|user:_zsh_highlight_widget_*);; # User defined widget: override and rebind old one with prefix "orig-". user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \