Fix #65, sourcing the script multiples times should not cause issues anymore

This commit is contained in:
Julien Nicoulaud 2011-08-02 20:25:00 +02:00
parent f27ef7a279
commit 186d80054a
1 changed files with 2 additions and 2 deletions

View File

@ -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]#*:}; \