We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 491b32b commit 4f0fb14Copy full SHA for 4f0fb14
zsh-syntax-highlighting.zsh
@@ -365,8 +365,19 @@ _zsh_highlight_bind_widgets()
365
}
366
367
if (( $zsh_highlight_use_redrawhook )); then
368
+ _zsh_highlight__zle-line-finish() {
369
+ # Reset $WIDGET since the 'main' highlighter depends on it.
370
+ #
371
+ # A nested function is required to hide zle parameters; see
372
+ # "User-defined widgets" in zshall.
373
+ () {
374
+ local -h +r WIDGET=zle-line-finish
375
+ _zsh_highlight "$@"
376
+ }
377
378
_zsh_highlight_bind_widgets(){}
379
add-zle-hook-widget zle-line-pre-redraw _zsh_highlight
380
+ add-zle-hook-widget zle-line-finish _zsh_highlight__zle-line-finish
381
fi
382
383
# Load highlighters from directory.
0 commit comments