main: Correct array assignment check

This commit is contained in:
Matthew Martin
2018-03-21 19:51:48 -05:00
parent 12e01336f1
commit c06e5e95dc
3 changed files with 72 additions and 1 deletions

View File

@@ -610,7 +610,8 @@ _zsh_highlight_main_highlighter_highlight_list()
hashed) style=hashed-command;;
none) if _zsh_highlight_main_highlighter_check_assign; then
style=assign
if [[ $arg[-1] == '(' ]]; then
local i=$(( arg[(i)=] + 1 ))
if [[ $arg[i] == '(' ]]; then
in_array_assignment=true
else
# assignment to a scalar parameter.