forked from aniani/vim
updated for version 7.4.118
Problem: It's possible that redrawing the status lines causes win_redr_custom() to be called recursively. Solution: Protect against recursiveness. (Yasuhiro Matsumoto)
This commit is contained in:
13
src/screen.c
13
src/screen.c
@@ -6653,6 +6653,7 @@ win_redr_custom(wp, draw_ruler)
|
|||||||
win_T *wp;
|
win_T *wp;
|
||||||
int draw_ruler; /* TRUE or FALSE */
|
int draw_ruler; /* TRUE or FALSE */
|
||||||
{
|
{
|
||||||
|
static int entered = FALSE;
|
||||||
int attr;
|
int attr;
|
||||||
int curattr;
|
int curattr;
|
||||||
int row;
|
int row;
|
||||||
@@ -6671,6 +6672,13 @@ win_redr_custom(wp, draw_ruler)
|
|||||||
win_T *ewp;
|
win_T *ewp;
|
||||||
int p_crb_save;
|
int p_crb_save;
|
||||||
|
|
||||||
|
/* There is a tiny chance that this gets called recursively: When
|
||||||
|
* redrawing a status line triggers redrawing the ruler or tabline.
|
||||||
|
* Avoid trouble by not allowing recursion. */
|
||||||
|
if (entered)
|
||||||
|
return;
|
||||||
|
entered = TRUE;
|
||||||
|
|
||||||
/* setup environment for the task at hand */
|
/* setup environment for the task at hand */
|
||||||
if (wp == NULL)
|
if (wp == NULL)
|
||||||
{
|
{
|
||||||
@@ -6746,7 +6754,7 @@ win_redr_custom(wp, draw_ruler)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (maxwidth <= 0)
|
if (maxwidth <= 0)
|
||||||
return;
|
goto theend;
|
||||||
|
|
||||||
/* Temporarily reset 'cursorbind', we don't want a side effect from moving
|
/* Temporarily reset 'cursorbind', we don't want a side effect from moving
|
||||||
* the cursor away and back. */
|
* the cursor away and back. */
|
||||||
@@ -6827,6 +6835,9 @@ win_redr_custom(wp, draw_ruler)
|
|||||||
while (col < Columns)
|
while (col < Columns)
|
||||||
TabPageIdxs[col++] = fillchar;
|
TabPageIdxs[col++] = fillchar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
theend:
|
||||||
|
entered = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FEAT_STL_OPT */
|
#endif /* FEAT_STL_OPT */
|
||||||
|
@@ -738,6 +738,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 */
|
||||||
|
/**/
|
||||||
|
118,
|
||||||
/**/
|
/**/
|
||||||
117,
|
117,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user