Re: [vim/vim] runtime(sh): fix Bash array value highlighting after escaped parens (PR #20705)
Francesco (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/20705/[email protected]> |
frapank left a comment (vim/vim#20705)
I think the new dump is the correct one.
The "$" in "${bins[...]}" is escaped, so it is just a literal "$" at that point. It only becomes an expansion when eval parses it again. sh.vim already handles this as shEscape elsewhere ("echo ${bins[1]}"), the array case was just missing
I tried avoiding changes to that line by making shParen ignore escaped "(", but shArithParen still matches the bare "(", so the closing ")" gets consumed anyway. Handling the escape in the cluster seems to be the only fix that covers both cases.
Regenerated sh_12_11.dump (single line) and added "foo=(a ( b)" to the test. The same issue happens inside array values: the region stays open and leaks to the end of the file.
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20705#issuecomment-5078754043
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/pull/20705/[email protected]>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20705/c5078754043%40github.com.