diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-08-07 21:13:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-08-07 21:13:23 +0200 |
commit | 86f931e1c3252798dbd60a5d4e07e3c64ae8ee74 (patch) | |
tree | c5d67148f3a7a0d997f1c1f34ea9d9f6f8cd064b | |
parent | a95d8235549a91f1ae3381b82c81d6a75f425642 (diff) |
updated for version 7.4b.019v7.4b.019
Problem: Tabline is not updated properly when closing a tab on Win32.
Solution: Only reduce flickering when adding a tab. (Ken Takata)
-rw-r--r-- | src/gui_w48.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 1 deletions
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 @@ -728,6 +728,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 19, +/**/ 18, /**/ 17, |