patch 8.2.1110: Vim9: line continuation does not work in function arguments
Problem: Vim9: line continuation does not work in function arguments.
Solution: Pass "evalarg" to get_func_tv(). Fix seeing double quoted string
as comment.
diff --git a/src/list.c b/src/list.c
index ffcffa9..2bea55e 100644
--- a/src/list.c
+++ b/src/list.c
@@ -1177,7 +1177,7 @@
return FAIL;
}
- *arg = skipwhite_and_linebreak(*arg + 1, evalarg);
+ *arg = skipwhite_and_linebreak_keep_string(*arg + 1, evalarg);
while (**arg != ']' && **arg != NUL)
{
if (eval1(arg, &tv, evalarg) == FAIL) // recursive!
@@ -1207,8 +1207,9 @@
*arg = skipwhite(*arg + 1);
}
- // the "]" can be on the next line
- *arg = skipwhite_and_linebreak(*arg, evalarg);
+ // The "]" can be on the next line. But a double quoted string may
+ // follow, not a comment.
+ *arg = skipwhite_and_linebreak_keep_string(*arg, evalarg);
if (**arg == ']')
break;
@@ -2356,7 +2357,7 @@
}
if (l != NULL)
{
- list_insert_tv(l, &argvars[1], item);
+ (void)list_insert_tv(l, &argvars[1], item);
copy_tv(&argvars[0], rettv);
}
}