summaryrefslogtreecommitdiffstats
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-27 22:09:39 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-27 22:09:39 +0100
commit50985eb1f0bd3c73ce727f9bbd66c839c92ef0da (patch)
treee7b8b997f064de0b6b9fb57ee031fa41ef175e56 /src/evalvars.c
parent3f169ce17e8b779d105c96138a8b4246f2d270b9 (diff)
patch 8.2.0159: non-materialized range() list causes problemsv8.2.0159
Problem: Non-materialized range() list causes problems. (Fujiwara Takuya) Solution: Materialize the list where needed.
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index 38cb457e11..cc4a70f757 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -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);