summaryrefslogtreecommitdiffstats
path: root/src/quickfix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index b939275a37..0cb9c6956c 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -1124,6 +1124,7 @@ qf_jump(dir, errornr, forceit)
# endif
if (win_split(0, n) == FAIL)
goto theend;
+ opened_window = TRUE; /* close it when fail */
if (curwin->w_height < p_hh)
win_setheight((int)p_hh);
@@ -1137,7 +1138,7 @@ qf_jump(dir, errornr, forceit)
* If currently in the quickfix window, find another window to show the
* file in.
*/
- if (bt_quickfix(curbuf))
+ if (bt_quickfix(curbuf) && !opened_window)
{
/*
* If there is no file specified, we don't know where to go.