Skip to content

Commit aed99f6

Browse files
danielshahafphy1729
authored andcommitted
wrappers: Reimplement using Mikachu's zle-line-pre-redraw hook (workers/36650).
1 parent d6586e2 commit aed99f6

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
@@ -49,6 +49,11 @@ if true; then
4949
fi
5050
fi
5151

52+
integer zsh_highlight_use_redrawhook
53+
if zle -la .match-bracket; then
54+
(( zsh_highlight_use_redrawhook=1 ))
55+
fi
56+
5257
# -------------------------------------------------------------------------------------------------
5358
# Core highlighting update system
5459
# -------------------------------------------------------------------------------------------------
@@ -357,6 +362,11 @@ _zsh_highlight_bind_widgets()
357362
done
358363
}
359364

365+
if (( $zsh_highlight_use_redrawhook )); then
366+
_zsh_highlight_bind_widgets(){}
367+
zle -N zle-line-pre-redraw _zsh_highlight
368+
fi
369+
360370
# Load highlighters from directory.
361371
#
362372
# Arguments:

0 commit comments

Comments
 (0)