aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-04-03 20:36:11 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-04-13 12:00:34 -0400
commit572627255983b7733b6ad05da52b3e704aae8a2f (patch)
treedb4262ffb11d38689dad8740a6f8264e3483ef6f /src/nvim/eval.c
parent366e75b6be57220b28f2abc22add19d5df33b5a3 (diff)
downloadrneovim-572627255983b7733b6ad05da52b3e704aae8a2f.tar.gz
rneovim-572627255983b7733b6ad05da52b3e704aae8a2f.tar.bz2
rneovim-572627255983b7733b6ad05da52b3e704aae8a2f.zip
vim-patch:8.2.0507: getbufvar() may get the wrong dictionary
Problem: Getbufvar() may get the wrong dictionary. (David le Blanc) Solution: Check for empty name. (closes vim/vim#5878) https://github.com/vim/vim/commit/5259275347667a90fb88d8ea74331f88ad68edfc
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index f301d29335..12b13a1f08 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -9536,7 +9536,8 @@ dictitem_T *find_var(const char *const name, const size_t name_len,
return find_var_in_scoped_ht(name, name_len, no_autoload || htp != NULL);
}
-/// Find variable in hashtab
+/// Find variable in hashtab.
+/// When "varname" is empty returns curwin/curtab/etc vars dictionary.
///
/// @param[in] ht Hashtab to find variable in.
/// @param[in] htname Hashtab name (first character).