mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +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:
@@ -1348,12 +1348,8 @@ void set_var_const(const char *name, const size_t name_len, typval_T *const tv,
|
||||
}
|
||||
|
||||
if (watched) {
|
||||
if (oldtv.v_type == VAR_UNKNOWN) {
|
||||
tv_dict_watcher_notify(dict, (char *)v->di_key, &v->di_tv, NULL);
|
||||
} else {
|
||||
tv_dict_watcher_notify(dict, (char *)v->di_key, &v->di_tv, &oldtv);
|
||||
tv_clear(&oldtv);
|
||||
}
|
||||
tv_dict_watcher_notify(dict, (char *)v->di_key, &v->di_tv, &oldtv);
|
||||
tv_clear(&oldtv);
|
||||
}
|
||||
|
||||
if (is_const) {
|
||||
|
Reference in New Issue
Block a user