diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/shada.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/shada.c b/src/nvim/shada.c index 3b08c8a184..95257fe945 100644 --- a/src/nvim/shada.c +++ b/src/nvim/shada.c @@ -2679,7 +2679,30 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer, switch (vartv.v_type) { case VAR_FUNC: case VAR_PARTIAL: + tv_clear(&vartv); continue; + case VAR_DICT: + { + dict_T *di = vartv.vval.v_dict; + int copyID = get_copyID(); + if (!set_ref_in_ht(&di->dv_hashtab, copyID, NULL) + && copyID == di->dv_copyID) { + tv_clear(&vartv); + continue; + } + break; + } + case VAR_LIST: + { + list_T *l = vartv.vval.v_list; + int copyID = get_copyID(); + if (!set_ref_in_list(l, copyID, NULL) + && copyID == l->lv_copyID) { + tv_clear(&vartv); + continue; + } + break; + } default: break; } |