'brackets': Allow unset ZSH_HIGHLIGHT_STYLES
Without this when bracket_color_size is 0,
$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
errors with division by zero.
This commit is contained in:
@@ -76,7 +76,9 @@ _zsh_highlight_brackets_highlighter()
|
|||||||
# Now highlight all found brackets
|
# Now highlight all found brackets
|
||||||
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
|
||||||
style=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
|
style=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
style=bracket-error
|
style=bracket-error
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user