'main': Fix a bug manifesting under zsh 5.2 and older.

The escaped caret was taken for a negated character class.  This caused test-data/arith1.zsh
to XPass: the arithmetic expansion was consumed by the 'while' loop.
This commit is contained in:
Daniel Shahaf 2020-03-17 16:13:32 +00:00
parent d237a60c9b
commit e165f18c75

View File

@ -1243,7 +1243,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
# multiplications from being highlighted as globbing (issue #607,
# test-data/arith1.zsh)
fi
while [[ $arg[i+1] == [\^=~#+] ]]; do
while [[ $arg[i+1] == [=~#+'^'] ]]; do
(( i += 1 ))
done
if [[ $arg[i+1] == [*@#?$!-] ]]; then