0
0
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:
Bram Moolenaar
2020-02-19 12:40:39 +01:00
parent 406cd90f19
commit 38a5f517a7
3 changed files with 35 additions and 1 deletions

View File

@@ -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));