0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.0159: non-materialized range() list causes problems

Problem:    Non-materialized range() list causes problems. (Fujiwara Takuya)
Solution:   Materialize the list where needed.
This commit is contained in:
Bram Moolenaar
2020-01-27 22:09:39 +01:00
parent 3f169ce17e
commit 50985eb1f0
12 changed files with 268 additions and 21 deletions

View File

@@ -1600,13 +1600,14 @@ func_call(
dict_T *selfdict,
typval_T *rettv)
{
list_T *l = args->vval.v_list;
listitem_T *item;
typval_T argv[MAX_FUNC_ARGS + 1];
int argc = 0;
int r = 0;
for (item = args->vval.v_list->lv_first; item != NULL;
item = item->li_next)
range_list_materialize(l);
for (item = l->lv_first; item != NULL; item = item->li_next)
{
if (argc == MAX_FUNC_ARGS - (partial == NULL ? 0 : partial->pt_argc))
{