Bash associative arrays with escaped parens in the subscript break
highlighting for everything after them, e.g.:
declare -A bar=(
[\(\)]="baz"
)
echo ${bar[\(\)]}
The echo on the last line gets highlighted as an array value instead
of a statement.
@shArrayValueList (used inside array subscripts) didn't include
shEscape, so an escaped ( was picked up by shParen instead of
being treated as a literal char. shParen then never found its
closing ) on that line (the escaped \) got eaten by shEscape,
which is in shParen's own contains list), so it kept looking forward
and consumed the real closing paren of the array. The array region
never closed and bled into the following lines.
Adding shEscape to @shArrayValueList (bash and ksh branches) fixes
it.
closes: #18712
https://github.com/vim/vim/pull/20705
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()