mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
main: Correct array assignment check
This commit is contained in:
parent
12e01336f1
commit
c06e5e95dc
3 changed files with 72 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue