1
0
forked from aniani/vim

patch 8.2.1322: Vim9: method on double quoted string doesn't work

Problem:    Vim9: method on double quoted string doesn't work.
Solution:   Recognize double quoted string. (closes #6562)
This commit is contained in:
Bram Moolenaar
2020-07-29 20:00:38 +02:00
parent 7b7f78f51d
commit 1040956292
4 changed files with 17 additions and 3 deletions

View File

@@ -3277,7 +3277,7 @@ find_ex_command(
char_u *pskip = (*eap->cmd == '&' || *eap->cmd == '$'
|| *eap->cmd == '@') ? eap->cmd + 1 : eap->cmd;
if (vim_strchr((char_u *)"{('[", *p) != NULL
if (vim_strchr((char_u *)"{('[\"", *p) != NULL
|| ((p = to_name_const_end(pskip)) > eap->cmd && *p != NUL))
{
int oplen;
@@ -3293,6 +3293,8 @@ find_ex_command(
*eap->cmd == '{'
// "'string'->func()" is an expression.
|| *eap->cmd == '\''
// '"string"->func()' is an expression.
|| *eap->cmd == '"'
// "g:varname" is an expression.
|| eap->cmd[1] == ':'
)