mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user