main: consume trailing whitespace in _highlight_list
Fixes highlighting when an unclosed $( ends in whitespace.
This commit is contained in:
@@ -28,16 +28,17 @@
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
BUFFER='echo "foo$('
|
||||
BUFFER='echo "foo$( '
|
||||
|
||||
expected_region_highlight=(
|
||||
'1 4 builtin' # echo
|
||||
'6 11 default' # "foo$(
|
||||
'6 12 default' # "foo$(
|
||||
'6 9 double-quoted-argument-unclosed' # "foo
|
||||
'10 11 command-substitution-quoted' # $(
|
||||
'10 12 command-substitution-quoted' # $(
|
||||
'10 11 command-substitution-delimiter-quoted' # $(
|
||||
)
|
||||
|
||||
if [[ ${(z):-'$('} == '$( ' ]]; then # ignore zsh 5.0.8 bug
|
||||
expected_region_highlight[2]='6 12 default' # "foo$(
|
||||
expected_region_highlight[2]='6 13 default' # "foo$(
|
||||
expected_region_highlight[4]='10 13 command-substitution-quoted' # $(
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user