Skip to content

Commit 6fd92e1

Browse files
committed
'main': Don't progress the $in_redirection staller while $in_param.
Fixes #712.
1 parent 792c065 commit 6fd92e1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

highlighters/main/main-highlighter.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ _zsh_highlight_main_highlighter_highlight_list()
617617
if (( in_redirection == 0 )); then
618618
this_word=$next_word
619619
next_word=':regular:'
620-
else
620+
elif (( !in_param )); then
621621
# Stall $next_word.
622622
(( --in_redirection ))
623623
fi

highlighters/main/test-data/redirection-from-param.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ BUFFER=$'<$fn cat'
3535

3636
expected_region_highlight=(
3737
'1 1 redirection' # <
38-
'2 4 path "issue #712"' # $fn
39-
'6 8 command "issue #712"' # cat
38+
'2 4 path' # $fn
39+
'6 8 command' # cat
4040
)

0 commit comments

Comments
 (0)