Mercurial > vim
diff src/evalwindow.c @ 20879:0ab45b558621 v8.2.0991
patch 8.2.0991: cannot get window type for autocmd and preview window
Commit: https://github.com/vim/vim/commit/0fe937fd8616fcd24b1b1ef2ab9f1657615dd22c
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 16 22:42:04 2020 +0200
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 https://github.com/vim/vim/issues/6277)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 16 Jun 2020 22:45:04 +0200 |
parents | 3ff714d765ba |
children | 27401f09fe9b |
line wrap: on
line diff
--- a/src/evalwindow.c +++ b/src/evalwindow.c @@ -858,13 +858,18 @@ f_win_gettype(typval_T *argvars, typval_ 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 }