aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-02-21 05:17:20 +0300
committerZyX <kp-pav@yandex.ru>2016-04-18 02:48:20 +0300
commit7cdd01983aeb452e0a3f3eb027e75fe02ce48718 (patch)
tree2a505d9d7317f3279a0a2c098ed3d73ed5f44a59 /src/nvim/api/vim.c
parent2f67786796d5fb4237f4b0258ec3db0982cc7f53 (diff)
downloadrneovim-7cdd01983aeb452e0a3f3eb027e75fe02ce48718.tar.gz
rneovim-7cdd01983aeb452e0a3f3eb027e75fe02ce48718.tar.bz2
rneovim-7cdd01983aeb452e0a3f3eb027e75fe02ce48718.zip
api/documentation: Add a warning that nil may mean v:null
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 09d5f1b6f8..dcae08d24c 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -336,7 +336,10 @@ Object vim_get_var(String name, Error *err)
/// @param name The variable name
/// @param value The variable value
/// @param[out] err Details of an error that may have occurred
-/// @return the old value if any
+/// @return The old value or nil if there was no previous value.
+///
+/// @warning It may return nil if there was no previous value
+/// or if previous value was `v:null`.
Object vim_set_var(String name, Object value, Error *err)
{
return dict_set_value(&globvardict, name, value, false, err);