mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1901: variable completion does not work in command line window
Problem: Variable completion does not work in command line window. Solution: Use the "prevwin". (closes #7198)
This commit is contained in:
@@ -1981,7 +1981,13 @@ get_user_var_name(expand_T *xp, int idx)
|
||||
}
|
||||
|
||||
// b: variables
|
||||
ht = &curbuf->b_vars->dv_hashtab;
|
||||
ht =
|
||||
#ifdef FEAT_CMDWIN
|
||||
// In cmdwin, the alternative buffer should be used.
|
||||
(cmdwin_type != 0 && get_cmdline_type() == NUL) ?
|
||||
&prevwin->w_buffer->b_vars->dv_hashtab :
|
||||
#endif
|
||||
&curbuf->b_vars->dv_hashtab;
|
||||
if (bdone < ht->ht_used)
|
||||
{
|
||||
if (bdone++ == 0)
|
||||
@@ -1994,7 +2000,13 @@ get_user_var_name(expand_T *xp, int idx)
|
||||
}
|
||||
|
||||
// w: variables
|
||||
ht = &curwin->w_vars->dv_hashtab;
|
||||
ht =
|
||||
#ifdef FEAT_CMDWIN
|
||||
// In cmdwin, the alternative window should be used.
|
||||
(cmdwin_type != 0 && get_cmdline_type() == NUL) ?
|
||||
&prevwin->w_vars->dv_hashtab :
|
||||
#endif
|
||||
&curwin->w_vars->dv_hashtab;
|
||||
if (wdone < ht->ht_used)
|
||||
{
|
||||
if (wdone++ == 0)
|
||||
|
Reference in New Issue
Block a user