brackets: Disallow negative nesting level
This commit is contained in:
parent
ac90970edc
commit
9dcfacc4a5
@ -59,11 +59,15 @@ _zsh_highlight_highlighter_brackets_paint()
|
|||||||
lastoflevel[$level]=$pos
|
lastoflevel[$level]=$pos
|
||||||
;;
|
;;
|
||||||
[")]}"])
|
[")]}"])
|
||||||
matchingpos=$lastoflevel[$level]
|
if (( level > 0 )); then
|
||||||
levelpos[$pos]=$((level--))
|
matchingpos=$lastoflevel[$level]
|
||||||
if _zsh_highlight_brackets_match $matchingpos $pos; then
|
levelpos[$pos]=$((level--))
|
||||||
matching[$matchingpos]=$pos
|
if _zsh_highlight_brackets_match $matchingpos $pos; then
|
||||||
matching[$pos]=$matchingpos
|
matching[$matchingpos]=$pos
|
||||||
|
matching[$pos]=$matchingpos
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
levelpos[$pos]=-1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
['"'\'])
|
['"'\'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user