0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4428: crash when switching tabpage while in the cmdline window

Problem:    Crash when switching tabpage while in the cmdline window.
Solution:   Disallow switching tabpage when in the cmdline window.
This commit is contained in:
Bram Moolenaar
2022-02-20 20:49:35 +00:00
parent 944697ae19
commit 0f6e28f686
5 changed files with 35 additions and 32 deletions

View File

@@ -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)