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/channel.c b/src/channel.c
index 5f03068..3d891e8 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -5123,6 +5123,7 @@
return FAIL;
}
+ range_list_materialize(item->vval.v_list);
li = item->vval.v_list->lv_first;
for (; li != NULL && n < 16; li = li->li_next, n++)
{
@@ -5529,6 +5530,7 @@
listitem_T *li;
char_u *s;
+ range_list_materialize(l);
for (li = l->lv_first; li != NULL; li = li->li_next)
{
s = tv_get_string_chk(&li->li_tv);