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)
This commit is contained in:
@ -2459,6 +2459,7 @@ gui_mch_update_tabline(void)
|
|||||||
TCITEM tie;
|
TCITEM tie;
|
||||||
int nr = 0;
|
int nr = 0;
|
||||||
int curtabidx = 0;
|
int curtabidx = 0;
|
||||||
|
int tabadded = 0;
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
static int use_unicode = FALSE;
|
static int use_unicode = FALSE;
|
||||||
int uu;
|
int uu;
|
||||||
@ -2499,6 +2500,7 @@ gui_mch_update_tabline(void)
|
|||||||
/* Add the tab */
|
/* Add the tab */
|
||||||
tie.pszText = "-Empty-";
|
tie.pszText = "-Empty-";
|
||||||
TabCtrl_InsertItem(s_tabhwnd, nr, &tie);
|
TabCtrl_InsertItem(s_tabhwnd, nr, &tie);
|
||||||
|
tabadded = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_tabline_label(tp, FALSE);
|
get_tabline_label(tp, FALSE);
|
||||||
@ -2531,12 +2533,15 @@ gui_mch_update_tabline(void)
|
|||||||
while (nr < TabCtrl_GetItemCount(s_tabhwnd))
|
while (nr < TabCtrl_GetItemCount(s_tabhwnd))
|
||||||
TabCtrl_DeleteItem(s_tabhwnd, nr);
|
TabCtrl_DeleteItem(s_tabhwnd, nr);
|
||||||
|
|
||||||
|
if (!tabadded && TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
|
||||||
|
TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
|
||||||
|
|
||||||
/* Re-enable redraw and redraw. */
|
/* Re-enable redraw and redraw. */
|
||||||
SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)TRUE, 0);
|
SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)TRUE, 0);
|
||||||
RedrawWindow(s_tabhwnd, NULL, NULL,
|
RedrawWindow(s_tabhwnd, NULL, NULL,
|
||||||
RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
|
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);
|
TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -727,6 +727,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
19,
|
||||||
/**/
|
/**/
|
||||||
18,
|
18,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user