Skip to content

Commit 0cd9c4c

Browse files
committed
wrappers: Reimplement using Mikachu's zle-line-pre-redraw hook (workers/36650).
1 parent 663c760 commit 0cd9c4c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

zsh-syntax-highlighting.zsh

+10
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ else
4646
return 1
4747
fi
4848

49+
integer zsh_highlight_use_redrawhook
50+
if zle -la .match-bracket; then
51+
(( zsh_highlight_use_redrawhook=1 ))
52+
fi
53+
4954
# -------------------------------------------------------------------------------------------------
5055
# Core highlighting update system
5156
# -------------------------------------------------------------------------------------------------
@@ -215,6 +220,11 @@ _zsh_highlight_bind_widgets()
215220
done
216221
}
217222

223+
if (( $zsh_highlight_use_redrawhook )); then
224+
_zsh_highlight_bind_widgets(){}
225+
zle -N zle-line-pre-redraw _zsh_highlight
226+
fi
227+
218228
# Load highlighters from directory.
219229
#
220230
# Arguments:

0 commit comments

Comments
 (0)