forked from aniani/vim
patch 9.0.0499: in :def function list created after const is locked
Problem: In :def function list created after const is locked. Solution: Reset v_lock. (closes #11154)
This commit is contained in:
parent
747f110420
commit
566badc76b
@ -2023,6 +2023,13 @@ def Test_var_declaration()
|
|||||||
unlet w:FLIST
|
unlet w:FLIST
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_create_list_after_const()
|
||||||
|
const a = 1
|
||||||
|
g:ll = []
|
||||||
|
assert_equal(0, islocked('g:ll'))
|
||||||
|
unlet g:ll
|
||||||
|
enddef
|
||||||
|
|
||||||
def Test_var_declaration_fails()
|
def Test_var_declaration_fails()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
|
@ -699,6 +699,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
499,
|
||||||
/**/
|
/**/
|
||||||
498,
|
498,
|
||||||
/**/
|
/**/
|
||||||
|
@ -200,6 +200,7 @@ exe_newlist(int count, ectx_T *ectx)
|
|||||||
tv = STACK_TV_BOT(-1);
|
tv = STACK_TV_BOT(-1);
|
||||||
tv->v_type = VAR_LIST;
|
tv->v_type = VAR_LIST;
|
||||||
tv->vval.v_list = list;
|
tv->vval.v_list = list;
|
||||||
|
tv->v_lock = 0;
|
||||||
if (list != NULL)
|
if (list != NULL)
|
||||||
++list->lv_refcount;
|
++list->lv_refcount;
|
||||||
return OK;
|
return OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user