mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
'main': Don't find command positions within multiline array literals.
Fixes #333.
This commit is contained in:
parent
5627fd2045
commit
8bf423d16d
2 changed files with 47 additions and 2 deletions
|
|
@ -613,8 +613,13 @@ _zsh_highlight_highlighter_main_paint()
|
|||
[[ $style == path || $style == path_prefix ]] && _zsh_highlight_main_highlighter_highlight_path_separators
|
||||
fi
|
||||
if [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR:#"$arg"} ]]; then
|
||||
next_word=':start:'
|
||||
highlight_glob=true
|
||||
if [[ $arg == ';' ]] && $in_array_assignment; then
|
||||
# literal newline inside an array assignment
|
||||
next_word=':regular:'
|
||||
else
|
||||
next_word=':start:'
|
||||
highlight_glob=true
|
||||
fi
|
||||
elif
|
||||
[[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_CONTROL_FLOW:#"$arg"} && $this_word == *':start:'* ]] ||
|
||||
[[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS:#"$arg"} && $this_word == *':start:'* ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue