0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -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

@@ -2786,8 +2786,12 @@ ex_diffgetput(exarg_T *eap)
idx_to = idx_other;
// Need to make the other buffer the current buffer to be able to make
// changes in it.
// set curwin/curbuf to buf and save a few things
// Set curwin/curbuf to buf and save a few things.
aucmd_prepbuf(&aco, curtab->tp_diffbuf[idx_other]);
if (curbuf != curtab->tp_diffbuf[idx_other])
// Could not find a window for this buffer, the rest is likely to
// fail.
goto theend;
}
// May give the warning for a changed buffer here, which can trigger the