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

patch 9.0.0965: using one window for executing autocommands is insufficient

Problem:    Using one window for executing autocommands is insufficient.
Solution:   Use up to five windows for executing autocommands.
This commit is contained in:
Bram Moolenaar
2022-11-28 18:51:43 +00:00
parent 74a694dbe2
commit e76062c078
28 changed files with 451 additions and 260 deletions

View File

@@ -136,6 +136,8 @@ typedef struct {
*
* Information is saved in "cob" and MUST be restored by calling
* change_other_buffer_restore().
*
* If this fails then "curbuf" will not be equal to "buf".
*/
static void
change_other_buffer_prepare(cob_T *cob, buf_T *buf)
@@ -156,7 +158,8 @@ change_other_buffer_prepare(cob_T *cob, buf_T *buf)
// curwin->w_buffer differ from "curbuf", use the autocmd window.
curbuf = curwin->w_buffer;
aucmd_prepbuf(&cob->cob_aco, buf);
cob->cob_using_aco = TRUE;
if (curbuf == buf)
cob->cob_using_aco = TRUE;
}
}