forked from aniani/vim
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)
This commit is contained in:
@@ -6639,6 +6639,12 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
|
||||
}
|
||||
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;
|
||||
|
Reference in New Issue
Block a user