aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-01-31 01:04:10 +0000
committerGitHub <noreply@github.com>2022-01-31 01:04:10 +0000
commit2870311a37314135b73e0ee54b41da86c9540a39 (patch)
tree8e1a1f1475b322c613a4886e37600b57824ef746 /src/nvim/eval.c
parentd38f81849bac5cf8fb95643f4f01a45c68d5370c (diff)
parentc91fbc1b9e8b56e260555b14cd3bc4b9b4874037 (diff)
downloadrneovim-2870311a37314135b73e0ee54b41da86c9540a39.tar.gz
rneovim-2870311a37314135b73e0ee54b41da86c9540a39.tar.bz2
rneovim-2870311a37314135b73e0ee54b41da86c9540a39.zip
Merge pull request #17239 from seandewar/vim-8.2.3629
vim-patch:8.2.{3433,3629}
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 3325628a8e..cf3322df1b 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -3218,9 +3218,8 @@ char_u *get_user_var_name(expand_T *xp, int idx)
// b: variables
// In cmdwin, the alternative buffer should be used.
- hashtab_T *ht = (cmdwin_type != 0 && get_cmdline_type() == NUL)
- ? &prevwin->w_buffer->b_vars->dv_hashtab
- : &curbuf->b_vars->dv_hashtab;
+ hashtab_T *ht
+ = is_in_cmdwin() ? &prevwin->w_buffer->b_vars->dv_hashtab : &curbuf->b_vars->dv_hashtab;
if (bdone < ht->ht_used) {
if (bdone++ == 0) {
hi = ht->ht_array;
@@ -3235,9 +3234,7 @@ char_u *get_user_var_name(expand_T *xp, int idx)
// w: variables
// In cmdwin, the alternative window should be used.
- ht = (cmdwin_type != 0 && get_cmdline_type() == NUL)
- ? &prevwin->w_vars->dv_hashtab
- : &curwin->w_vars->dv_hashtab;
+ ht = is_in_cmdwin() ? &prevwin->w_vars->dv_hashtab : &curwin->w_vars->dv_hashtab;
if (wdone < ht->ht_used) {
if (wdone++ == 0) {
hi = ht->ht_array;