diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-11-20 11:09:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 11:09:44 +0100 |
commit | 3e87f5ccf8ef792827d2e4daad495c61f0e01938 (patch) | |
tree | 32ddd2a7c7a0282ea1a3bafb721d0e3bf72b34f0 /src/nvim/quickfix.c | |
parent | deb18a050ef522791c48c7c8c549a2c4b2043be0 (diff) | |
parent | 54a586736bab4a657b1457c59d1c0959f009687d (diff) | |
download | rneovim-3e87f5ccf8ef792827d2e4daad495c61f0e01938.tar.gz rneovim-3e87f5ccf8ef792827d2e4daad495c61f0e01938.tar.bz2 rneovim-3e87f5ccf8ef792827d2e4daad495c61f0e01938.zip |
Merge #9256 'vim-patch:8.0.{737,1163,1165,1171,1249,1427}'
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 51a7dd670f..d9e307bb71 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -2661,6 +2661,8 @@ void ex_copen(exarg_T *eap) } } } else { + int flags = 0; + qf_buf = qf_find_buf(qi); /* The current window becomes the previous window afterwards. */ @@ -2668,11 +2670,17 @@ void ex_copen(exarg_T *eap) 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. */ + // Create the new quickfix 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 */ + // Default is to open the window below the current window + if (cmdmod.split == 0) { + flags = WSP_BELOW; + } + flags |= WSP_NEWLOC; + if (win_split(height, flags) == FAIL) { + return; // not enough room for window + } RESET_BINDING(curwin); if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) { |