0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2020-01-27 22:09:39 +01:00
parent 3f169ce17e
commit 50985eb1f0
12 changed files with 268 additions and 21 deletions

View File

@@ -843,6 +843,7 @@ ex_let_vars(
return FAIL;
}
range_list_materialize(l);
item = l->lv_first;
while (*arg != ']')
{
@@ -1699,7 +1700,7 @@ item_lock(typval_T *tv, int deep, int lock)
l->lv_lock |= VAR_LOCKED;
else
l->lv_lock &= ~VAR_LOCKED;
if (deep < 0 || deep > 1)
if ((deep < 0 || deep > 1) && l->lv_first != &range_list_item)
// recursive: lock/unlock the items the List contains
for (li = l->lv_first; li != NULL; li = li->li_next)
item_lock(&li->li_tv, deep - 1, lock);