'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:
parent
eaa4335c34
commit
f73f3d53d3
@ -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
|
||||||
style=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
|
if (( bracket_color_size )); then
|
||||||
|
style=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
style=bracket-error
|
style=bracket-error
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user