brackets: Don't call _zsh_highlight_add_highlight with empty style

This commit is contained in:
Matthew Martin 2017-11-02 19:11:00 -05:00
parent f547f7768c
commit ac90970edc
1 changed files with 2 additions and 3 deletions

View File

@ -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.