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.
diff --git a/src/insexpand.c b/src/insexpand.c
index 0be2009..0b2435f 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2330,6 +2330,7 @@
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 @@
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);