File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -727,6 +727,8 @@ static char *(features[]) =
727727
728728static int included_patches [] =
729729{ /* Add new patch number below this line */
730+ /**/
731+ 19 ,
730732/**/
731733 18 ,
732734/**/
You can’t perform that action at this time.
0 commit comments