api: vim_set_var() should return the old value #2899

Closes #2816
This commit is contained in:
Justin M. Keyes
2015-06-25 00:13:33 -04:00
parent 406e9876b6
commit f78bf64771
2 changed files with 8 additions and 0 deletions

View File

@@ -146,6 +146,7 @@ Object dict_set_value(dict_T *dict, String key, Object value, Error *err)
dict_add(dict, di);
} else {
// Return the old value
rv = vim_to_object(&di->di_tv);
clear_tv(&di->di_tv);
}