summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-12-11 15:52:01 +0100
committerBram Moolenaar <bram@vim.org>2013-12-11 15:52:01 +0100
commit3392479420f06145181c6aff689f4b6bb0945e8b (patch)
tree3a5ccece7185f7c76817abd648780ecb452c87cf
parente43740d9e93f1fea064d701ca1781eac89aa42a3 (diff)
downloadvim-3392479420f06145181c6aff689f4b6bb0945e8b.tar.gz
updated for version 7.4.118v7.4.118v7-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)
-rw-r--r--src/screen.c13
-rw-r--r--src/version.c2
2 files changed, 14 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index f738e2bb..a030207a 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -6653,6 +6653,7 @@ win_redr_custom(wp, draw_ruler)
win_T *wp;
int draw_ruler; /* TRUE or FALSE */
{
+ static int entered = FALSE;
int attr;
int curattr;
int row;
@@ -6671,6 +6672,13 @@ win_redr_custom(wp, draw_ruler)
win_T *ewp;
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 */
if (wp == NULL)
{
@@ -6746,7 +6754,7 @@ win_redr_custom(wp, draw_ruler)
}
if (maxwidth <= 0)
- return;
+ goto theend;
/* Temporarily reset 'cursorbind', we don't want a side effect from moving
* the cursor away and back. */
@@ -6827,6 +6835,9 @@ win_redr_custom(wp, draw_ruler)
while (col < Columns)
TabPageIdxs[col++] = fillchar;
}
+
+theend:
+ entered = FALSE;
}
#endif /* FEAT_STL_OPT */
diff --git a/src/version.c b/src/version.c
index a8c54a9a..29d41a9d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 118,
+/**/
117,
/**/
116,