From 50985eb1f0bd3c73ce727f9bbd66c839c92ef0da Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 27 Jan 2020 22:09:39 +0100 Subject: 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. --- src/insexpand.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/insexpand.c') diff --git a/src/insexpand.c b/src/insexpand.c index 0be20092a..0b2435f4c 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -2330,6 +2330,7 @@ ins_compl_add_list(list_T *list) int dir = compl_direction; // Go through the List with matches and add each of them. + range_list_materialize(list); for (li = list->lv_first; li != NULL; li = li->li_next) { if (ins_compl_add_tv(&li->li_tv, dir) == OK) @@ -2511,6 +2512,7 @@ get_complete_info(list_T *what_list, dict_T *retdict) else { what_flag = 0; + range_list_materialize(what_list); for (item = what_list->lv_first; item != NULL; item = item->li_next) { char_u *what = tv_get_string(&item->li_tv); -- cgit v1.2.1