aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
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 dcae08d24c..10110b0f62 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -349,7 +349,10 @@ Object vim_set_var(String name, Object value, Error *err)
///
/// @param name The variable name
/// @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_del_var(String name, Error *err)
{
return dict_set_value(&globvardict, name, NIL, true, err);