diff options
author | smolck <46855713+smolck@users.noreply.github.com> | 2021-08-14 12:19:05 -0500 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-09-27 14:47:53 +0200 |
commit | c7d30c152d1639523d05154e245ea60ed9a51a2b (patch) | |
tree | 9e329b4448ef83620d46160741791a6b3c4da86c /src/nvim/eval/typval.c | |
parent | 1d337d4e2f2265b13ecf19a3bc17ad302d3b0d96 (diff) | |
download | rneovim-c7d30c152d1639523d05154e245ea60ed9a51a2b.tar.gz rneovim-c7d30c152d1639523d05154e245ea60ed9a51a2b.tar.bz2 rneovim-c7d30c152d1639523d05154e245ea60ed9a51a2b.zip |
fix(api): notify dict watchers on nvim_set_var and vim.g setter
Co-authored-by: bfredl <bjorn.linse@gmail.com>
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r-- | src/nvim/eval/typval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index f9aed7a966..5639414dad 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -1781,7 +1781,7 @@ void tv_dict_watcher_notify(dict_T *const dict, const char *const key, typval_T tv_dict_add(argv[2].vval.v_dict, v); } - if (oldtv) { + if (oldtv && oldtv->v_type != VAR_UNKNOWN) { dictitem_T *const v = tv_dict_item_alloc_len(S_LEN("old")); tv_copy(oldtv, &v->di_tv); tv_dict_add(argv[2].vval.v_dict, v); |