]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1201 v7.3.1201
authorBram Moolenaar <Bram@vim.org>
Sat, 15 Jun 2013 19:54:16 +0000 (21:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 15 Jun 2013 19:54:16 +0000 (21:54 +0200)
Problem:    When a startup script creates a preview window, it probably
            becomes the current window.
Solution:   Make another window the current one. (Christian Brabandt)

src/main.c
src/version.c

index 9c11b432a541a4acddf9096a9d5c5e38e0483ce8..5c1405ea3c1764c067276683c2cbe549f3e2d619 100644 (file)
@@ -2816,7 +2816,25 @@ edit_buffers(parmp)
 # ifdef FEAT_AUTOCMD
     --autocmd_no_enter;
 # endif
-    win_enter(firstwin, FALSE);                /* back to first window */
+#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
+    /*
+     * Avoid making a preview window the current window.
+     */
+    if (firstwin->w_p_pvw)
+    {
+       win_T   *win;
+
+       for (win = firstwin; win != NULL; win = win->w_next)
+           if (!win->w_p_pvw)
+           {
+               firstwin = win;
+               break;
+           }
+    }
+#endif
+    /* make the first window the current window */
+    win_enter(firstwin, FALSE);
+
 # ifdef FEAT_AUTOCMD
     --autocmd_no_leave;
 # endif
index bb9edce1f4ff2d9a285d6a35b1d5f5f7e8a9d619..2f47dad7a913d8de240a95643d97591503025acb 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1201,
 /**/
     1200,
 /**/