mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
vim-patch:8.1.2315: switchbuf=uselast #11480
Problem: Not always using the right window when jumping to an error.
Solution: Add the "uselast" flag in 'switchbuf'. (closes vim/vim#1652)
539aa6b25e
This commit is contained in:

committed by
Justin M. Keyes

parent
f33371c03f
commit
0a9ecf460a
@@ -2595,8 +2595,11 @@ static void qf_goto_win_with_qfl_file(int qf_fnum)
|
||||
|
||||
if (IS_QF_WINDOW(win)) {
|
||||
// Didn't find it, go to the window before the quickfix
|
||||
// window.
|
||||
if (altwin != NULL) {
|
||||
// window, unless 'switchbuf' contains 'uselast': in this case we
|
||||
// try to jump to the previously used window first.
|
||||
if ((swb_flags & SWB_USELAST) && win_valid(prevwin)) {
|
||||
win = prevwin;
|
||||
} else if (altwin != NULL) {
|
||||
win = altwin;
|
||||
} else if (curwin->w_prev != NULL) {
|
||||
win = curwin->w_prev;
|
||||
|
Reference in New Issue
Block a user