From 86f931e1c3252798dbd60a5d4e07e3c64ae8ee74 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 7 Aug 2013 21:13:23 +0200 Subject: updated for version 7.4b.019 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 | 7 ++++++- src/version.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui_w48.c b/src/gui_w48.c index 2f92414d37..164a9f9edb 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -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); } diff --git a/src/version.c b/src/version.c index 1744af4158..5e4a595437 100644 --- a/src/version.c +++ b/src/version.c @@ -727,6 +727,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 19, /**/ 18, /**/ -- cgit v1.2.3