summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-01 17:28:33 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-01 17:28:33 +0200
commite6b5324e3a3d354363f3c48e784c42ce3e77453f (patch)
tree7e4ddd66d330a898256b3ea8060768a761aa2cc2 /src/list.c
parent086eb18ba16164ca5258068cff9c4b2db742f2ef (diff)
downloadvim-git-e6b5324e3a3d354363f3c48e784c42ce3e77453f.tar.gz
patch 8.2.1110: Vim9: line continuation does not work in function argumentsv8.2.1110
Problem: Vim9: line continuation does not work in function arguments. Solution: Pass "evalarg" to get_func_tv(). Fix seeing double quoted string as comment.
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/list.c b/src/list.c
index ffcffa9f0..2bea55e02 100644
--- a/src/list.c
+++ b/src/list.c
@@ -1177,7 +1177,7 @@ get_list_tv(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int do_error)
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 @@ get_list_tv(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int do_error)
*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 @@ f_insert(typval_T *argvars, typval_T *rettv)
}
if (l != NULL)
{
- list_insert_tv(l, &argvars[1], item);
+ (void)list_insert_tv(l, &argvars[1], item);
copy_tv(&argvars[0], rettv);
}
}