File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -737,9 +737,17 @@ _zsh_highlight_main_highlighter_highlight_list()
737
737
else
738
738
style=unknown-token
739
739
fi
740
- if [[ $arg == ( ' ; ' | $' \n ' ) ]] && $in_array_assignment ; then
740
+ if [[ $arg == $' \n ' ]] && $in_array_assignment ; then
741
741
# literal newline inside an array assignment
742
742
next_word=' :regular:'
743
+ elif [[ $arg == ' ;' ]] && $in_array_assignment ; then
744
+ # literal semicolon inside an array assignment
745
+ #
746
+ # This is parsed the same way as a literal newline. Nevertheless,
747
+ # highlight it as an error since it's probably unintended. Compare
748
+ # issue #691.
749
+ next_word=' :regular:'
750
+ style=unknown-token
743
751
else
744
752
next_word=' :start:'
745
753
highlight_glob=true
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ BUFFER=$'a=( foo ; bar )'
33
33
expected_region_highlight=(
34
34
' 1 3 assign' # a=(
35
35
' 5 7 default' # foo
36
- ' 9 9 unknown-token "fixed in the after-next (grandchild) commit" ' # ;
36
+ ' 9 9 unknown-token' # ; (not commandseparator; see highlighter source code)
37
37
' 11 13 default' # bar
38
38
' 15 15 assign' # )
39
39
)
You can’t perform that action at this time.
0 commit comments