patch 8.2.3547: opening the quickfix window triggers BufWinEnter twice
Problem: Opening the quickfix window triggers BufWinEnter twice. (Yorick
Peterse)
Solution: Only trigger BufWinEnter with "quickfix". (closes #9022)
diff --git a/src/buffer.c b/src/buffer.c
index 8082499..31f902d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -360,11 +360,12 @@
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