File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -296,12 +296,15 @@ _zsh_highlight_bind_widgets()
296296 builtin) eval " _zsh_highlight_widget_${(q)cur_widget} () { _zsh_highlight_call_widget .${(q)cur_widget} -- \"\$ @\" }"
297297 zle -N $cur_widget _zsh_highlight_widget_$cur_widget ;;
298298
299+ * )
299300 # Incomplete or nonexistent widget: Bind to z-sy-h directly.
300- ' ' ) _zsh_highlight_widget_${cur_widget} () { : ; _zsh_highlight }
301- zle -N $cur_widget _zsh_highlight_widget_$cur_widget ;;
302-
301+ if [[ $cur_widget == zle-* ]] && [[ -z $widgets [$cur_widget ] ]]; then
302+ _zsh_highlight_widget_${cur_widget} () { : ; _zsh_highlight }
303+ zle -N $cur_widget _zsh_highlight_widget_$cur_widget ;;
304+ else
303305 # Default: unhandled case.
304- * ) print -r -- >&2 " zsh-syntax-highlighting: unhandled ZLE widget '$cur_widget '" ;;
306+ print -r -- >&2 " zsh-syntax-highlighting: unhandled ZLE widget '$cur_widget '" ;;
307+ fi
305308 esac
306309 done
307310}
You can’t perform that action at this time.
0 commit comments