aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-25 02:27:10 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-25 02:45:00 -0500
commit9b2efe6b7d40d6ef317751768a65c74e4e2e8152 (patch)
tree90005568ab027108eed21fa4ccfcbc8135cc024d /src/nvim/eval/funcs.c
parentede747c2cc84382e8746df8992ef0e403647ffde (diff)
downloadrneovim-9b2efe6b7d40d6ef317751768a65c74e4e2e8152.tar.gz
rneovim-9b2efe6b7d40d6ef317751768a65c74e4e2e8152.tar.bz2
rneovim-9b2efe6b7d40d6ef317751768a65c74e4e2e8152.zip
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) https://github.com/vim/vim/commit/0fe937fd8616fcd24b1b1ef2ab9f1657615dd22c Cherry-pick test_preview.vim,test_window_cmd.vim changes from patch v8.2.0522.
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index 090133c868..d07efc297e 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -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");