'main': Fix an issue whereby a --option was highlighted as a file
Regression test included. Fixes #578. Review-by: Matthew Martin
This commit is contained in:
@@ -1045,9 +1045,10 @@ _zsh_highlight_main_highlighter_highlight_argument()
|
||||
highlights+=($reply)
|
||||
;;
|
||||
'$')
|
||||
path_eligible=0
|
||||
if [[ $arg[i+1] != "'" ]]; then
|
||||
path_eligible=0
|
||||
fi
|
||||
if [[ $arg[i+1] == "'" ]]; then
|
||||
path_eligible=1
|
||||
_zsh_highlight_main_highlighter_highlight_dollar_quote $i
|
||||
(( i = REPLY ))
|
||||
highlights+=($reply)
|
||||
|
||||
Reference in New Issue
Block a user