0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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)
This commit is contained in:
Bram Moolenaar
2021-10-20 21:58:42 +01:00
parent 09f7723d5a
commit 1d30fde3c9
6 changed files with 36 additions and 9 deletions

View File

@@ -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