summaryrefslogtreecommitdiffstats
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-20 20:49:35 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-20 20:49:35 +0000
commit0f6e28f686dbb59ab3b562408ab9b2234797b9b1 (patch)
tree38ebe0450e05aa92515b1025337ab2a402b54ca8 /src/evalvars.c
parent944697ae19683441981539cd4d2469df89d6ec82 (diff)
patch 8.2.4428: crash when switching tabpage while in the cmdline windowv8.2.4428
Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index 40375588c2..dabd49b675 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2199,12 +2199,7 @@ get_user_var_name(expand_T *xp, int idx)
}
// b: variables
- ht =
-#ifdef FEAT_CMDWIN
- // In cmdwin, the alternative buffer should be used.
- is_in_cmdwin() ? &prevwin->w_buffer->b_vars->dv_hashtab :
-#endif
- &curbuf->b_vars->dv_hashtab;
+ ht = &prevwin_curwin()->w_buffer->b_vars->dv_hashtab;
if (bdone < ht->ht_used)
{
if (bdone++ == 0)
@@ -2217,12 +2212,7 @@ get_user_var_name(expand_T *xp, int idx)
}
// w: variables
- ht =
-#ifdef FEAT_CMDWIN
- // In cmdwin, the alternative window should be used.
- is_in_cmdwin() ? &prevwin->w_vars->dv_hashtab :
-#endif
- &curwin->w_vars->dv_hashtab;
+ ht = &prevwin_curwin()->w_vars->dv_hashtab;
if (wdone < ht->ht_used)
{
if (wdone++ == 0)