comparison src/popupmenu.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 ba9f50bfda83
children 62ea983a9cb4
comparison
equal deleted inserted replaced
19200:654ef8f794a6 19201:e7b4fff348dd
1312 1312
1313 balloon_arraysize = list->lv_len; 1313 balloon_arraysize = list->lv_len;
1314 balloon_array = ALLOC_CLEAR_MULT(pumitem_T, list->lv_len); 1314 balloon_array = ALLOC_CLEAR_MULT(pumitem_T, list->lv_len);
1315 if (balloon_array == NULL) 1315 if (balloon_array == NULL)
1316 return; 1316 return;
1317 range_list_materialize(list);
1317 for (idx = 0, li = list->lv_first; li != NULL; li = li->li_next, ++idx) 1318 for (idx = 0, li = list->lv_first; li != NULL; li = li->li_next, ++idx)
1318 { 1319 {
1319 char_u *text = tv_get_string_chk(&li->li_tv); 1320 char_u *text = tv_get_string_chk(&li->li_tv);
1320 1321
1321 balloon_array[idx].pum_text = vim_strsave( 1322 balloon_array[idx].pum_text = vim_strsave(