mirror of
https://github.com/vim/vim.git
synced 2025-10-27 09:24:23 -04:00
patch 8.2.0276: Vim9: not allowing space before ")" in function call
Problem: Vim9: not allowing space before ")" in function call is too
restrictive. (Ben Jackson)
Solution: Skip space before the ")". Adjust other space checks.
This commit is contained in:
@@ -1658,9 +1658,21 @@ compile_arguments(char_u **arg, cctx_T *cctx, int *argcount)
|
||||
if (compile_expr1(&p, cctx) == FAIL)
|
||||
return FAIL;
|
||||
++*argcount;
|
||||
|
||||
if (*p != ',' && *skipwhite(p) == ',')
|
||||
{
|
||||
emsg(_("E1068: No white space allowed before ,"));
|
||||
p = skipwhite(p);
|
||||
}
|
||||
if (*p == ',')
|
||||
p = skipwhite(p + 1);
|
||||
{
|
||||
++p;
|
||||
if (!VIM_ISWHITE(*p))
|
||||
emsg(_("E1069: white space required after ,"));
|
||||
}
|
||||
p = skipwhite(p);
|
||||
}
|
||||
p = skipwhite(p);
|
||||
if (*p != ')')
|
||||
{
|
||||
emsg(_(e_missing_close));
|
||||
|
||||
Reference in New Issue
Block a user