* If inside Vim9 script, "arg" points to the end of a line (ignoring a #
* comment) and there is a next line, return the next line (skipping blanks)
* and set "getnext".
- * Otherwise just return "arg" unmodified and set "getnext" to FALSE.
+ * Otherwise return the next non-white at or after "arg" and set "getnext" to
+ * FALSE.
* "arg" must point somewhere inside a line, not at the start.
*/
char_u *
if (in_vim9script()
&& evalarg != NULL
&& (evalarg->eval_cookie != NULL || evalarg->eval_cctx != NULL)
- && (*p == NUL || (VIM_ISWHITE(p[-1]) && vim9_comment_start(p))))
+ && (*p == NUL || (vim9_comment_start(p) && VIM_ISWHITE(p[-1]))))
{
char_u *next;
CheckDefExecAndScriptFailure(lines, 'E1106: One argument too many', 1)
enddef
+def Test_closing_brace_at_start_of_line()
+ var lines =<< trim END
+ def Func()
+ enddef
+ Func(
+ )
+ END
+ call CheckDefAndScriptSuccess(lines)
+enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker