1
0
forked from aniani/vim

patch 8.2.2396: Vim9: no white space allowed before "->"

Problem:    Vim9: no white space allowed before "->".
Solution:   Allow for white space. (closes #7725)
This commit is contained in:
Bram Moolenaar
2021-01-23 14:22:16 +01:00
parent 9a562c184d
commit 7cebe8ba7d
4 changed files with 24 additions and 11 deletions

View File

@@ -3313,8 +3313,9 @@ find_ex_command(
if (vim_strchr((char_u *)"{('[\"@", *p) != NULL
|| ((p = to_name_const_end(pskip)) > eap->cmd && *p != NUL))
{
int oplen;
int heredoc;
int oplen;
int heredoc;
char_u *swp = skipwhite(p);
if (
// "(..." is an expression.
@@ -3332,7 +3333,7 @@ find_ex_command(
|| eap->cmd[1] == ':'
)
// "varname->func()" is an expression.
: (*p == '-' && p[1] == '>')))
: (*swp == '-' && swp[1] == '>')))
{
if (*eap->cmd == '{' && ends_excmd(*skipwhite(eap->cmd + 1)))
{