File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -250,8 +250,10 @@ _zsh_highlight_bind_widgets()
250
250
}
251
251
252
252
# Override ZLE widgets to make them invoke _zsh_highlight.
253
+ local -U widgets_to_bind
254
+ widgets_to_bind=(${${(k)widgets} :# (.* |orig-* |run-help|which-command|beep|set-local-history|yank)} )
253
255
local cur_widget
254
- for cur_widget in ${ ${(k)widgets} :# (. * |orig- * |run-help|which-command|beep|set-local-history|yank)} ; do
256
+ for cur_widget in $widgets_to_bind ; do
255
257
case $widgets [$cur_widget ] in
256
258
257
259
# Already rebound event: do nothing.
@@ -277,6 +279,10 @@ _zsh_highlight_bind_widgets()
277
279
builtin) eval " _zsh_highlight_widget_${(q)cur_widget} () { _zsh_highlight_call_widget .${(q)cur_widget} -- \"\$ @\" }"
278
280
zle -N $cur_widget _zsh_highlight_widget_$cur_widget ;;
279
281
282
+ # Incomplete or nonexistent widget: Bind to z-sy-h driectly.
283
+ ' ' ) _zsh_highlight_widget_${cur_widget} () { : ; _zsh_highlight }
284
+ zle -N $cur_widget _zsh_highlight_widget_$cur_widget ;;
285
+
280
286
# Default: unhandled case.
281
287
* ) print -r -- >&2 " zsh-syntax-highlighting: unhandled ZLE widget '$cur_widget '" ;;
282
288
esac
You can’t perform that action at this time.
0 commit comments