'main': Fix the last commit's bug concerning parameter elision not happening in redirects in command position.
This commit is contained in:
parent
41b8a74692
commit
ea3ae74164
@ -750,7 +750,7 @@ _zsh_highlight_main_highlighter_highlight_list()
|
||||
# parameters that refer to commands, functions, and builtins.
|
||||
() {
|
||||
local -a words; words=( "${reply[@]}" )
|
||||
if (( $#words == 0 )); then
|
||||
if (( $#words == 0 )) && (( ! in_redirection )); then
|
||||
# Parameter elision is happening
|
||||
(( ++in_redirection ))
|
||||
_zsh_highlight_main_add_region_highlight $start_pos $end_pos comment
|
||||
|
@ -32,7 +32,7 @@ BUFFER=$'<$foo cat cat'
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 1 redirection' # <
|
||||
'2 5 default "fixed in the next commit"' # $foo
|
||||
'7 9 command "fixed in the next commit"' # cat
|
||||
'11 13 default "fixed in the next commit"' # cat
|
||||
'2 5 default' # $foo
|
||||
'7 9 command' # cat
|
||||
'11 13 default' # cat
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user