Mercurial > vim
diff src/evalbuffer.c @ 31263:d8e7d725a666 v9.0.0965
patch 9.0.0965: using one window for executing autocommands is insufficient
Commit: https://github.com/vim/vim/commit/e76062c078debed0df818f70e4db14ad7a7cb53a
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 28 18:51:43 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 28 Nov 2022 20:00:05 +0100 |
parents | 87ff5e71d3c2 |
children | 08e6a44e5c77 |
line wrap: on
line diff
--- a/src/evalbuffer.c +++ b/src/evalbuffer.c @@ -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, // 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; } }