Mercurial > vim
diff src/autocmd.c @ 16778:eda4d65f232c v8.1.1391
patch 8.1.1391: no popup window support
commit https://github.com/vim/vim/commit/4d784b21d14fc66e98a2b07f70343cdd4acd62aa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 25 19:51:39 2019 +0200
patch 8.1.1391: no popup window support
Problem: No popup window support.
Solution: Add initial code for popup windows. Add the 'wincolor' option.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 May 2019 20:00:08 +0200 |
parents | ef00b6bc186b |
children | ce04ebdf26b8 |
line wrap: on
line diff
--- 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); }