vim-patch:8.2.0991: cannot get window type for autocmd and preview window

Problem:    Cannot get window type for autocmd and preview window.
Solution:   Add types to win_gettype(). (Yegappan Lakshmanan, closes vim/vim#6277)
0fe937fd86

Cherry-pick test_preview.vim,test_window_cmd.vim changes
from patch v8.2.0522.
This commit is contained in:
Jan Edmund Lazo
2020-11-25 02:27:10 -05:00
parent ede747c2cc
commit 9b2efe6b7d
5 changed files with 74 additions and 34 deletions

View File

@@ -11006,7 +11006,11 @@ static void f_win_gettype(typval_T *argvars, typval_T *rettv, FunPtr fptr)
return;
}
}
if (wp->w_floating) {
if (wp == aucmd_win) {
rettv->vval.v_string = vim_strsave((char_u *)"aucmdwin");
} else if (wp->w_p_pvw) {
rettv->vval.v_string = vim_strsave((char_u *)"preview");
} else if (wp->w_floating) {
rettv->vval.v_string = vim_strsave((char_u *)"popup");
} else if (wp == curwin && cmdwin_type != 0) {
rettv->vval.v_string = vim_strsave((char_u *)"command");