]> granicus.if.org Git - vim/commitdiff
updated for version 7.0-146 v7.0.146
authorBram Moolenaar <Bram@vim.org>
Fri, 20 Oct 2006 18:13:14 +0000 (18:13 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 20 Oct 2006 18:13:14 +0000 (18:13 +0000)
src/buffer.c
src/quickfix.c
src/version.c

index 55cef35d9cbbc1c31bab4b216d92d0ecb962e5f6..c9a91ceb3546ba00e8c7b3dfe120707ff9581ba1 100644 (file)
@@ -1208,11 +1208,11 @@ do_buffer(action, start, dir, count, forceit)
     {
 # ifdef FEAT_WINDOWS
        /* jump to first window containing buf if one exists ("useopen") */
-       if (vim_strchr(p_swb, 'o') && buf_jump_open_win(buf))
+       if (vim_strchr(p_swb, 'o') != NULL && buf_jump_open_win(buf))
            return OK;
        /* jump to first window in any tab page containing buf if one exists
         * ("usetab") */
-       if (vim_strchr(p_swb, 'a') && buf_jump_open_tab(buf))
+       if (vim_strchr(p_swb, 'a') != NULL && buf_jump_open_tab(buf))
            return OK;
        if (win_split(0, 0) == FAIL)
 # endif
@@ -1842,13 +1842,13 @@ buflist_getfile(n, lnum, options, forceit)
     if (options & GETF_SWITCH)
     {
        /* use existing open window for buffer if wanted */
-       if (vim_strchr(p_swb, 'o'))     /* useopen */
+       if (vim_strchr(p_swb, 'o') != NULL)     /* useopen */
            wp = buf_jump_open_win(buf);
        /* use existing open window in any tab page for buffer if wanted */
-       if (vim_strchr(p_swb, 'a'))     /* usetab */
+       if (vim_strchr(p_swb, 'a') != NULL)     /* usetab */
            wp = buf_jump_open_tab(buf);
        /* split window if wanted ("split") */
-       if (wp == NULL && vim_strchr(p_swb, 't') && !bufempty())
+       if (wp == NULL && vim_strchr(p_swb, 'l') != NULL && !bufempty())
        {
            if (win_split(0, 0) == FAIL)
                return FAIL;
index 6c102d953078ba9f43aab3c2d57de8ac7fcaeb9e..6268ec66f3f2d51f7ef16557ff2760e7237d84bc 100644 (file)
@@ -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;
 
index 3f163f47cb8585c61dc53a6adcca3e029bd5b62d..f40299124530bfd9f4a3b6fb8bae06c14863352b 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    146,
 /**/
     145,
 /**/