0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2066: Vim9: assignment with += doesn't work

Problem:    Vim9: assignment with += doesn't work.
Solution:   Do not see the "+" as an addition operator.
This commit is contained in:
Bram Moolenaar
2020-11-28 21:21:17 +01:00
parent f8ca03bf91
commit ce2c5444e2
4 changed files with 22 additions and 16 deletions

View File

@@ -3332,9 +3332,13 @@ find_ex_command(
// When followed by "=" or "+=" then it is an assignment.
++emsg_silent;
if (skip_expr(&after, NULL) == OK
&& (*after == '='
|| (*after != NUL && after[1] == '=')))
if (skip_expr(&after, NULL) == OK)
after = skipwhite(after);
else
after = (char_u *)"";
if (*after == '=' || (*after != NUL && after[1] == '=')
|| (after[0] == '.' && after[1] == '.'
&& after[2] == '='))
eap->cmdidx = CMD_var;
else
eap->cmdidx = CMD_eval;