summaryrefslogtreecommitdiff
path: root/src/quickfix.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/quickfix.c
parent09f7723d5a8694889350b13e3f6b4a9c3ed4c41f (diff)
downloadvim-git-1d30fde3c989a962e0e1af4cbcf90e1ea483f1f4.tar.gz
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/quickfix.c')
-rw-r--r--src/quickfix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 7cc83e3ed..3fb921ff2 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4199,13 +4199,14 @@ qf_open_new_cwindow(qf_info_T *qi, int height)
{
// Use the existing quickfix buffer
if (do_ecmd(qf_buf->b_fnum, NULL, NULL, NULL, ECMD_ONE,
- ECMD_HIDE + ECMD_OLDBUF, oldwin) == FAIL)
+ ECMD_HIDE + ECMD_OLDBUF + ECMD_NOWINENTER, oldwin) == FAIL)
return FAIL;
}
else
{
// Create a new quickfix buffer
- if (do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, oldwin) == FAIL)
+ if (do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE + ECMD_NOWINENTER,
+ oldwin) == FAIL)
return FAIL;
// save the number of the new buffer