diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 2867dcf..69589ce 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -278,10 +278,11 @@ _zsh_highlight_main_highlighter() # is how [[ ... ]] is highlighted, too. style=$ZSH_HIGHLIGHT_STYLES[reserved-word] _zsh_highlight_main_add_region_highlight $start_pos $((start_pos + 2)) $style + already_added=1 if [[ $arg[-2,-1] == '))' ]]; then _zsh_highlight_main_add_region_highlight $((end_pos - 2)) $end_pos $style + already_added=1 fi - already_added=1 elif [[ $arg == '()' || $arg == $'\x28' ]]; then # anonymous function # subshell