diff src/insexpand.c @ 19201:e7b4fff348dd v8.2.0159

patch 8.2.0159: non-materialized range() list causes problems Commit: https://github.com/vim/vim/commit/50985eb1f0bd3c73ce727f9bbd66c839c92ef0da Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 27 22:09:39 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Mon, 27 Jan 2020 22:15:07 +0100
parents 8cbadf7fb9d4
children 435726a03481
line wrap: on
line diff
--- 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, dic
     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);