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/term.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/term.c')
-rw-r--r-- | src/term.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c index 237a3258ae..b8869f9be8 100644 --- a/src/term.c +++ b/src/term.c @@ -2232,10 +2232,13 @@ set_termname(char_u *term) if (curbuf->b_ml.ml_mfp != NULL) { aucmd_prepbuf(&aco, buf); - apply_autocmds(EVENT_TERMCHANGED, NULL, NULL, FALSE, + if (curbuf == buf) + { + apply_autocmds(EVENT_TERMCHANGED, NULL, NULL, FALSE, curbuf); - // restore curwin/curbuf and a few other things - aucmd_restbuf(&aco); + // restore curwin/curbuf and a few other things + aucmd_restbuf(&aco); + } } } } |