1
0
forked from aniani/vim

patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script

Problem:    Vim9: wrong syntax of function in Vim9 script.
Solution:   Give error for missing space. Implement :echomsg and :echoerr.
            (closes #5670)
This commit is contained in:
Bram Moolenaar
2020-04-23 22:16:53 +02:00
parent 1df8b3fb04
commit f93c7fea08
10 changed files with 141 additions and 48 deletions

View File

@@ -128,7 +128,13 @@ one_function_arg(char_u *arg, garray_T *newargs, garray_T *argtypes, int skip)
}
if (*p == ':')
{
type = skipwhite(p + 1);
++p;
if (!VIM_ISWHITE(*p))
{
semsg(_(e_white_after), ":");
return arg;
}
type = skipwhite(p);
p = skip_type(type);
type = vim_strnsave(type, p - type);
}