comparison src/channel.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 94eda51ba9ba
children d776967d0f0d
comparison
equal deleted inserted replaced
19200:654ef8f794a6 19201:e7b4fff348dd
5121 { 5121 {
5122 semsg(_(e_invargval), "ansi_colors"); 5122 semsg(_(e_invargval), "ansi_colors");
5123 return FAIL; 5123 return FAIL;
5124 } 5124 }
5125 5125
5126 range_list_materialize(item->vval.v_list);
5126 li = item->vval.v_list->lv_first; 5127 li = item->vval.v_list->lv_first;
5127 for (; li != NULL && n < 16; li = li->li_next, n++) 5128 for (; li != NULL && n < 16; li = li->li_next, n++)
5128 { 5129 {
5129 char_u *color_name; 5130 char_u *color_name;
5130 guicolor_T guicolor; 5131 guicolor_T guicolor;
5527 win32_build_cmd(list_T *l, garray_T *gap) 5528 win32_build_cmd(list_T *l, garray_T *gap)
5528 { 5529 {
5529 listitem_T *li; 5530 listitem_T *li;
5530 char_u *s; 5531 char_u *s;
5531 5532
5533 range_list_materialize(l);
5532 for (li = l->lv_first; li != NULL; li = li->li_next) 5534 for (li = l->lv_first; li != NULL; li = li->li_next)
5533 { 5535 {
5534 s = tv_get_string_chk(&li->li_tv); 5536 s = tv_get_string_chk(&li->li_tv);
5535 if (s == NULL) 5537 if (s == NULL)
5536 return FAIL; 5538 return FAIL;