diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-25 19:51:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-25 19:51:39 +0200 |
commit | 4d784b21d14fc66e98a2b07f70343cdd4acd62aa (patch) | |
tree | c2e869a4f07eebdf7e0272c74b0fe7392807836c /src/autocmd.c | |
parent | 8f46e4c4bde13fd5ad68a6670b79cc462b65fbec (diff) | |
download | vim-git-4d784b21d14fc66e98a2b07f70343cdd4acd62aa.tar.gz |
patch 8.1.1391: no popup window supportv8.1.1391
Problem: No popup window support.
Solution: Add initial code for popup windows. Add the 'wincolor' option.
Diffstat (limited to 'src/autocmd.c')
-rw-r--r-- | src/autocmd.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/autocmd.c b/src/autocmd.c index 614bc331f..152dabde7 100644 --- a/src/autocmd.c +++ b/src/autocmd.c @@ -1349,7 +1349,7 @@ ex_doautoall(exarg_T *eap) */ FOR_ALL_BUFFERS(buf) { - if (buf->b_ml.ml_mfp != NULL) + if (buf->b_ml.ml_mfp != NULL && !bt_popup(buf)) { // find a window for this buffer and save some values aucmd_prepbuf(&aco, buf); @@ -1423,7 +1423,7 @@ aucmd_prepbuf( // back to using the current window. if (win == NULL && aucmd_win == NULL) { - win_alloc_aucmd_win(); + aucmd_win = win_alloc_popup_win(); if (aucmd_win == NULL) win = curwin; } @@ -1451,20 +1451,12 @@ aucmd_prepbuf( // unexpected results. aco->use_aucmd_win = TRUE; aucmd_win_used = TRUE; - aucmd_win->w_buffer = buf; -#if defined(FEAT_SYN_HL) || defined(FEAT_SPELL) - aucmd_win->w_s = &buf->b_s; -#endif - ++buf->b_nwindows; - win_init_empty(aucmd_win); // set cursor and topline to safe values - // Make sure w_localdir and globaldir are NULL to avoid a chdir() in - // win_enter_ext(). - VIM_CLEAR(aucmd_win->w_localdir); + win_init_popup_win(aucmd_win, buf); + aco->globaldir = globaldir; globaldir = NULL; - // Split the current window, put the aucmd_win in the upper half. // We don't want the BufEnter or WinEnter autocommands. block_autocmds(); @@ -1620,6 +1612,8 @@ apply_autocmds( int force, // when TRUE, ignore autocmd_busy buf_T *buf) // buffer for <abuf> { + if (bt_popup(buf)) + return FALSE; return apply_autocmds_group(event, fname, fname_io, force, AUGROUP_ALL, buf, NULL); } |