summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-10-20 21:58:42 +0100
committerBram Moolenaar <Bram@vim.org>2021-10-20 21:58:42 +0100
commit1d30fde3c989a962e0e1af4cbcf90e1ea483f1f4 (patch)
tree138c81443921e31b93299222af015755ed61404e /src/buffer.c
parent09f7723d5a8694889350b13e3f6b4a9c3ed4c41f (diff)
patch 8.2.3547: opening the quickfix window triggers BufWinEnter twicev8.2.3547
Problem: Opening the quickfix window triggers BufWinEnter twice. (Yorick Peterse) Solution: Only trigger BufWinEnter with "quickfix". (closes #9022)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 808249908c..31f902d779 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -360,11 +360,12 @@ open_buffer(
do_modelines(0);
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
+ if ((flags & READ_NOWINENTER) == 0)
#ifdef FEAT_EVAL
- apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf,
- &retval);
+ apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL, FALSE,
+ curbuf, &retval);
#else
- apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf);
#endif
// restore curwin/curbuf and a few other things