]> granicus.if.org Git - vim/commitdiff
patch 8.0.0274: possible recursive screen updating causes trouble v8.0.0274
authorBram Moolenaar <Bram@vim.org>
Tue, 31 Jan 2017 20:53:39 +0000 (21:53 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 31 Jan 2017 20:53:39 +0000 (21:53 +0100)
Problem:    When update_single_line() is called recursively, or another screen
            update happens while it is busy, errors may occur.
Solution:   Check and update updating_screen. (Christian Brabandt)

src/screen.c
src/version.c

index e37bf483825e45b593f96c3b54e9db299ffb332a..fe366c995e73d5ec941c722411b605e4085a0b02 100644 (file)
@@ -824,8 +824,9 @@ update_single_line(win_T *wp, linenr_T lnum)
     int                j;
 
     /* Don't do anything if the screen structures are (not yet) valid. */
-    if (!screen_valid(TRUE))
+    if (!screen_valid(TRUE) || updating_screen)
        return;
+    updating_screen = TRUE;
 
     if (lnum >= wp->w_topline && lnum < wp->w_botline
                                 && foldedCount(wp, lnum, &win_foldinfo) == 0)
@@ -865,13 +866,11 @@ update_single_line(win_T *wp, linenr_T lnum)
 # endif
     }
     need_cursor_line_redraw = FALSE;
+    updating_screen = FALSE;
 }
 #endif
 
 #if defined(FEAT_SIGNS) || defined(FEAT_GUI)
-static void update_prepare(void);
-static void update_finish(void);
-
 /*
  * Prepare for updating one or more windows.
  * Caller must check for "updating_screen" already set to avoid recursiveness.
index a60de4c16eb5448b171e6965082d61a50c0d51d7..5814b206f4931dd66687f9f05c9d44e5a2f46ee3 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    274,
 /**/
     273,
 /**/