diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-28 18:51:43 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-28 18:51:43 +0000 |
commit | e76062c078debed0df818f70e4db14ad7a7cb53a (patch) | |
tree | e43b3b076fdea909c460219e896237a8924ccb6b /src/evalbuffer.c | |
parent | 74a694dbe20bb7dea4e06f474cf62e20f9c92f1d (diff) |
patch 9.0.0965: using one window for executing autocommands is insufficientv9.0.0965
Problem: Using one window for executing autocommands is insufficient.
Solution: Use up to five windows for executing autocommands.
Diffstat (limited to 'src/evalbuffer.c')
-rw-r--r-- | src/evalbuffer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/evalbuffer.c b/src/evalbuffer.c index 82a10d675c..e611c52e4c 100644 --- 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, 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; } } |