summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index fec27fa8b..85da690fb 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2347,8 +2347,10 @@ ex_copen(eap)
/* The current window becomes the previous window afterwards. */
win = curwin;
- if (eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
- /* Create the new window at the very bottom. */
+ if ((eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
+ && cmdmod.split == 0)
+ /* Create the new window at the very bottom, except when
+ * :belowright or :aboveleft is used. */
win_goto(lastwin);
if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
return; /* not enough room for window */