]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4b.019 v7.4b.019
authorBram Moolenaar <Bram@vim.org>
Wed, 7 Aug 2013 19:13:23 +0000 (21:13 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 7 Aug 2013 19:13:23 +0000 (21:13 +0200)
Problem:    Tabline is not updated properly when closing a tab on Win32.
Solution:   Only reduce flickering when adding a tab. (Ken Takata)

src/gui_w48.c
src/version.c

index 2f92414d371ac72951cd8078252ec64af1e7cf57..164a9f9edb3a171b37c0219e9f181ecc4273ea47 100644 (file)
@@ -2459,6 +2459,7 @@ gui_mch_update_tabline(void)
     TCITEM     tie;
     int                nr = 0;
     int                curtabidx = 0;
+    int                tabadded = 0;
 #ifdef FEAT_MBYTE
     static int use_unicode = FALSE;
     int                uu;
@@ -2499,6 +2500,7 @@ gui_mch_update_tabline(void)
            /* Add the tab */
            tie.pszText = "-Empty-";
            TabCtrl_InsertItem(s_tabhwnd, nr, &tie);
+           tabadded = 1;
        }
 
        get_tabline_label(tp, FALSE);
@@ -2531,12 +2533,15 @@ gui_mch_update_tabline(void)
     while (nr < TabCtrl_GetItemCount(s_tabhwnd))
        TabCtrl_DeleteItem(s_tabhwnd, nr);
 
+    if (!tabadded && TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
+       TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
+
     /* Re-enable redraw and redraw. */
     SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)TRUE, 0);
     RedrawWindow(s_tabhwnd, NULL, NULL,
                    RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
 
-    if (TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
+    if (tabadded && TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
        TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
 }
 
index 1744af4158f7fc02f4e012345e0d2d08fd5c36e6..5e4a5954372f0c8e77348e34c4fd0c04124137f5 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    19,
 /**/
     18,
 /**/