diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 7f5495e..64b3ad7 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -840,7 +840,7 @@ _zsh_highlight_main_highlighter_highlight_list() function) style=function;; command) style=command;; hashed) style=hashed-command;; - none) if _zsh_highlight_main_highlighter_check_assign; then + none) if (( ! in_param )) && _zsh_highlight_main_highlighter_check_assign; then _zsh_highlight_main_add_region_highlight $start_pos $end_pos assign local i=$(( arg[(i)=] + 1 )) if [[ $arg[i] == '(' ]]; then diff --git a/highlighters/main/test-data/parameter-value-contains-command-position1.zsh b/highlighters/main/test-data/parameter-value-contains-command-position1.zsh index b4a8a55..05ea1bf 100644 --- a/highlighters/main/test-data/parameter-value-contains-command-position1.zsh +++ b/highlighters/main/test-data/parameter-value-contains-command-position1.zsh @@ -34,5 +34,5 @@ BUFFER=$'$foobar' expected_region_highlight=( # Used to highlight the "ba" as 'command' because the 'ls' showed through; issues #670 and #674 - '1 7 assign' # $foobar + '1 7 unknown-token' # $foobar (not an assignment) ) diff --git a/highlighters/main/test-data/parameter-value-contains-command-position2.zsh b/highlighters/main/test-data/parameter-value-contains-command-position2.zsh index eca36d4..5042e89 100644 --- a/highlighters/main/test-data/parameter-value-contains-command-position2.zsh +++ b/highlighters/main/test-data/parameter-value-contains-command-position2.zsh @@ -34,5 +34,5 @@ BUFFER=$'$y' expected_region_highlight=( # Used to trigger a "BUG" message on stderr - issues #670 and #674 - '1 2 assign' # $y + '1 2 unknown-token' # $y (not an assignment) )