]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.118 v7.4.118
authorBram Moolenaar <Bram@vim.org>
Wed, 11 Dec 2013 14:52:01 +0000 (15:52 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 11 Dec 2013 14:52:01 +0000 (15:52 +0100)
Problem:    It's possible that redrawing the status lines causes
            win_redr_custom() to be called recursively.
Solution:   Protect against recursiveness. (Yasuhiro Matsumoto)

src/screen.c
src/version.c

index f738e2bb6ab8e7065d81646aa3f4ec97fe25c5dc..a030207ae1eed769e50e4e16f45d65ae1ba4d276 100644 (file)
@@ -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 */
index a8c54a9a670ce2567fcbff539e551834b25d6309..29d41a9dae903314586ea846181594955c6bedfb 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    118,
 /**/
     117,
 /**/