'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
|
||||
for pos in ${(k)levelpos}; do
|
||||
if (( $+matching[$pos] )); then
|
||||
if (( bracket_color_size )); then
|
||||
style=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
|
||||
fi
|
||||
else
|
||||
style=bracket-error
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user