Skip to content

Commit

Permalink
Fix sorin-ionescu#65, sourcing the script multiples times should not …
Browse files Browse the repository at this point in the history
…cause issues anymore
  • Loading branch information
nicoulaj committed Aug 2, 2011
1 parent f27ef7a commit 186d800
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zsh-syntax-highlighting.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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]#*:}; \
Expand Down

0 comments on commit 186d800

Please sign in to comment.