mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
'main': Correctly highlight '&&' and '||' inside '[[ … ]]' conditions.
This commit is contained in:
parent
b44964c545
commit
1000da306a
3 changed files with 45 additions and 1 deletions
|
|
@ -790,7 +790,8 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||
fi
|
||||
|
||||
# The Great Fork: is this a command word? Is this a non-command word?
|
||||
if [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR:#"$arg"} ]]; then
|
||||
if [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR:#"$arg"} ]] &&
|
||||
[[ $braces_stack != *T* || $arg != ('||'|'&&') ]]; then
|
||||
|
||||
# First, determine the style of the command separator itself.
|
||||
if _zsh_highlight_main__stack_pop T || _zsh_highlight_main__stack_pop Q; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue