summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-28 18:51:43 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-28 18:51:43 +0000
commite76062c078debed0df818f70e4db14ad7a7cb53a (patch)
treee43b3b076fdea909c460219e896237a8924ccb6b /src/ex_cmds2.c
parent74a694dbe20bb7dea4e06f474cf62e20f9c92f1d (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/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index c13d354bc1..9c00b80b7a 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -705,9 +705,12 @@ ex_listdo(exarg_T *eap)
else
{
aucmd_prepbuf(&aco, buf);
- apply_autocmds(EVENT_SYNTAX, buf->b_p_syn,
+ if (curbuf == buf)
+ {
+ apply_autocmds(EVENT_SYNTAX, buf->b_p_syn,
buf->b_fname, TRUE, buf);
- aucmd_restbuf(&aco);
+ aucmd_restbuf(&aco);
+ }
}
// start over, in case autocommands messed things up.