diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d9c18431dd..2f774f7b9d 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -4836,8 +4836,10 @@ bool set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack case VAR_PARTIAL: { partial_T *pt = tv->vval.v_partial; - // A partial does not have a copyID, because it cannot contain itself. - if (pt != NULL) { + if (pt != NULL && pt->pt_copyID != copyID) { + // Didn't see this partial yet. + pt->pt_copyID = copyID; + abort = set_ref_in_func(pt->pt_name, pt->pt_func, copyID); if (pt->pt_dict != NULL) { typval_T dtv; |