Mercurial > vim
changeset 5286:74a211a0d3a3 v7.4b.019
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 07 Aug 2013 21:13:23 +0200 |
parents | a1cf2af83e79 |
children | f6cacdc34495 |
files | src/gui_w48.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); }