0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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 #6277)
This commit is contained in:
Bram Moolenaar
2020-06-16 22:42:04 +02:00
parent a1bc6f1293
commit 0fe937fd86
5 changed files with 36 additions and 3 deletions

View File

@@ -858,13 +858,18 @@ f_win_gettype(typval_T *argvars, typval_T *rettv)
return;
}
}
if (wp == aucmd_win)
rettv->vval.v_string = vim_strsave((char_u *)"aucmdwin");
#if defined(FEAT_QUICKFIX)
else if (wp->w_p_pvw)
rettv->vval.v_string = vim_strsave((char_u *)"preview");
#endif
#ifdef FEAT_PROP_POPUP
if (WIN_IS_POPUP(wp))
else if (WIN_IS_POPUP(wp))
rettv->vval.v_string = vim_strsave((char_u *)"popup");
else
#endif
#ifdef FEAT_CMDWIN
if (wp == curwin && cmdwin_type != 0)
else if (wp == curwin && cmdwin_type != 0)
rettv->vval.v_string = vim_strsave((char_u *)"command");
#endif
}