mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
vim-patch:8.2.3629: command completion in cmdline window uses global commands
Problem: Command completion in cmdline window uses global user commands,
not local commands for the window where it was opened from.
Solution: Use local commands. (closes vim/vim#9168)
a119812437
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user