brackets: Don't call _zsh_highlight_add_highlight with empty style
This commit is contained in:
parent
f547f7768c
commit
ac90970edc
|
@ -77,12 +77,11 @@ _zsh_highlight_highlighter_brackets_paint()
|
||||||
for pos in ${(k)levelpos}; do
|
for pos in ${(k)levelpos}; do
|
||||||
if (( $+matching[$pos] )); then
|
if (( $+matching[$pos] )); then
|
||||||
if (( bracket_color_size )); then
|
if (( bracket_color_size )); then
|
||||||
style=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
|
_zsh_highlight_add_highlight $((pos - 1)) $pos bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
style=bracket-error
|
_zsh_highlight_add_highlight $((pos - 1)) $pos bracket-error
|
||||||
fi
|
fi
|
||||||
_zsh_highlight_add_highlight $((pos - 1)) $pos $style
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# If cursor is on a bracket, then highlight corresponding bracket, if any.
|
# If cursor is on a bracket, then highlight corresponding bracket, if any.
|
||||||
|
|
Loading…
Reference in New Issue