forked from aniani/vim
patch 8.2.4225: Vim9: depth argument of :lockvar not parsed in :def function
Problem: Vim9: depth argument of :lockvar not parsed in :def function. Solution: Parse the optional depth argument. (closes #9629) Fix that locking doesn't work for a non-materialize list.
This commit is contained in:
@@ -7922,7 +7922,7 @@ range_list_materialize(list_T *list)
|
||||
{
|
||||
varnumber_T start = list->lv_u.nonmat.lv_start;
|
||||
varnumber_T end = list->lv_u.nonmat.lv_end;
|
||||
int stride = list->lv_u.nonmat.lv_stride;
|
||||
int stride = list->lv_u.nonmat.lv_stride;
|
||||
varnumber_T i;
|
||||
|
||||
list->lv_first = NULL;
|
||||
@@ -7930,8 +7930,13 @@ range_list_materialize(list_T *list)
|
||||
list->lv_len = 0;
|
||||
list->lv_u.mat.lv_idx_item = NULL;
|
||||
for (i = start; stride > 0 ? i <= end : i >= end; i += stride)
|
||||
{
|
||||
if (list_append_number(list, (varnumber_T)i) == FAIL)
|
||||
break;
|
||||
if (list->lv_lock & VAR_ITEMS_LOCKED)
|
||||
list->lv_u.mat.lv_last->li_tv.v_lock = VAR_LOCKED;
|
||||
}
|
||||
list->lv_lock &= ~VAR_ITEMS_LOCKED;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user