aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-06-25 00:13:33 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-06-25 01:26:17 -0400
commitf78bf64771c47a685fb3a994d09d41ae970c77d0 (patch)
tree280a1c552364f92f91eab229fd90428a7b42058f /src
parent406e9876b635660d692bc2e4d12b200d75b8df01 (diff)
downloadrneovim-f78bf64771c47a685fb3a994d09d41ae970c77d0.tar.gz
rneovim-f78bf64771c47a685fb3a994d09d41ae970c77d0.tar.bz2
rneovim-f78bf64771c47a685fb3a994d09d41ae970c77d0.zip
api: vim_set_var() should return the old value #2899
Closes #2816
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/private/helpers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index 67ff77ebac..2a01f83688 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -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);
}