patch 8.2.2396: Vim9: no white space allowed before "->"
Problem: Vim9: no white space allowed before "->".
Solution: Allow for white space. (closes #7725)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 9562e6b..b9ae13d 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3313,8 +3313,9 @@
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 @@
|| eap->cmd[1] == ':'
)
// "varname->func()" is an expression.
- : (*p == '-' && p[1] == '>')))
+ : (*swp == '-' && swp[1] == '>')))
{
if (*eap->cmd == '{' && ends_excmd(*skipwhite(eap->cmd + 1)))
{