Skip to content

Commit fb7c0a9

Browse files
committed
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)
1 parent 8ef73e8 commit fb7c0a9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/gui_w48.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2459,6 +2459,7 @@ gui_mch_update_tabline(void)
24592459
TCITEM tie;
24602460
int nr = 0;
24612461
int curtabidx = 0;
2462+
int tabadded = 0;
24622463
#ifdef FEAT_MBYTE
24632464
static int use_unicode = FALSE;
24642465
int uu;
@@ -2499,6 +2500,7 @@ gui_mch_update_tabline(void)
24992500
/* Add the tab */
25002501
tie.pszText = "-Empty-";
25012502
TabCtrl_InsertItem(s_tabhwnd, nr, &tie);
2503+
tabadded = 1;
25022504
}
25032505

25042506
get_tabline_label(tp, FALSE);
@@ -2531,12 +2533,15 @@ gui_mch_update_tabline(void)
25312533
while (nr < TabCtrl_GetItemCount(s_tabhwnd))
25322534
TabCtrl_DeleteItem(s_tabhwnd, nr);
25332535

2536+
if (!tabadded && TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
2537+
TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
2538+
25342539
/* Re-enable redraw and redraw. */
25352540
SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)TRUE, 0);
25362541
RedrawWindow(s_tabhwnd, NULL, NULL,
25372542
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
25382543

2539-
if (TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
2544+
if (tabadded && TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
25402545
TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
25412546
}
25422547

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,8 @@ static char *(features[]) =
727727

728728
static int included_patches[] =
729729
{ /* Add new patch number below this line */
730+
/**/
731+
19,
730732
/**/
731733
18,
732734
/**/

0 commit comments

Comments
 (0)