patch 8.2.3048: strange error for white space after ++ command
Problem: Strange error for white space after ++ command.
Solution: Check for white space explicitly. (closes #8440)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index e78a032..cd83aea 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -6639,6 +6639,12 @@
}
if (eap->cmdidx == CMD_increment || eap->cmdidx == CMD_decrement)
{
+ if (VIM_ISWHITE(eap->cmd[2]))
+ {
+ semsg(_(e_no_white_space_allowed_after_str_str),
+ eap->cmdidx == CMD_increment ? "++" : "--", eap->cmd);
+ return NULL;
+ }
op = (char_u *)(eap->cmdidx == CMD_increment ? "+=" : "-=");
oplen = 2;
incdec = TRUE;