summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-10-20 18:13:14 +0000
committerBram Moolenaar <Bram@vim.org>2006-10-20 18:13:14 +0000
commit38c0a6e6faf4a0c11290c36fae9f188a80f1208c (patch)
tree6a0b9e76e33e5e8d0b410b28f7877198c3978ee4 /src/quickfix.c
parent2d8b2d8df908fa38a069aad313d0c5426c75a37a (diff)
downloadvim-git-38c0a6e6faf4a0c11290c36fae9f188a80f1208c.tar.gz
updated for version 7.0-146v7.0.146
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 6c102d953..6268ec66f 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -1586,10 +1586,30 @@ qf_jump(qi, dir, errornr, forceit)
}
/*
- * If there is only one window, create a new one above the quickfix
- * window.
+ * If no usable window is found and 'switchbuf' is set to 'usetab'
+ * then search in other tabs.
*/
- if (firstwin == lastwin || !usable_win)
+ if (!usable_win && vim_strchr(p_swb, 'a') != NULL)
+ {
+ tabpage_T *tp;
+ win_T *wp;
+
+ FOR_ALL_TAB_WINDOWS(tp, wp)
+ {
+ if (wp->w_buffer->b_fnum == qf_ptr->qf_fnum)
+ {
+ goto_tabpage_win(tp, wp);
+ usable_win = 1;
+ break;
+ }
+ }
+ }
+
+ /*
+ * If there is only one window and is the quickfix window, create a new
+ * one above the quickfix window.
+ */
+ if (((firstwin == lastwin) && bt_quickfix(curbuf)) || !usable_win)
{
ll_ref = curwin->w_llist_ref;