We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aed99f6 commit 85e62a8Copy full SHA for 85e62a8
zsh-syntax-highlighting.zsh
@@ -50,7 +50,9 @@ if true; then
50
fi
51
52
integer zsh_highlight_use_redrawhook
53
-if zle -la .match-bracket; then
+if autoload -U +X -- add-zle-hook-widget 2>/dev/null;
54
+ [[ "${${(@f)"$(which -- add-zle-hook-widget)"}[2]}" != $'\t'$histchars[3]' undefined' ]];
55
+then
56
(( zsh_highlight_use_redrawhook=1 ))
57
58
@@ -364,7 +366,9 @@ _zsh_highlight_bind_widgets()
364
366
365
367
if (( $zsh_highlight_use_redrawhook )); then
368
_zsh_highlight_bind_widgets(){}
- zle -N zle-line-pre-redraw _zsh_highlight
369
+ if [[ -o zle ]]; then
370
+ add-zle-hook-widget zle-line-pre-redraw _zsh_highlight
371
+ fi
372
373
374
# Load highlighters from directory.
0 commit comments