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

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:
Bram Moolenaar
2022-01-26 21:01:15 +00:00
parent 1080c48ec8
commit 70c43d84be
9 changed files with 82 additions and 18 deletions

View File

@@ -1464,8 +1464,9 @@ typedef struct
// allowed to mask existing functions
// Values for "v_lock".
#define VAR_LOCKED 1 // locked with lock(), can use unlock()
#define VAR_FIXED 2 // locked forever
#define VAR_LOCKED 1 // locked with lock(), can use unlock()
#define VAR_FIXED 2 // locked forever
#define VAR_ITEMS_LOCKED 4 // items of non-materialized list locked
/*
* Structure to hold an item of a list: an internal variable without a name.
@@ -1497,7 +1498,8 @@ struct listwatch_S
*/
struct listvar_S
{
listitem_T *lv_first; // first item, NULL if none
listitem_T *lv_first; // first item, NULL if none, &range_list_item
// for a non-materialized list
listwatch_T *lv_watch; // first watcher, NULL if none
union {
struct { // used for non-materialized range list: