summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-31 21:53:39 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-31 21:53:39 +0100
commit070b33da93ad3a191664bb61f5ccc50781460c03 (patch)
tree7d23a0b5d2cedcdb1a60317e4e72843e79878c55 /src
parentc4a249a736d40ec54794827ef95804c225d0e38f (diff)
downloadvim-070b33da93ad3a191664bb61f5ccc50781460c03.zip
patch 8.0.0274: possible recursive screen updating causes trouble
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)
Diffstat (limited to 'src')
-rw-r--r--src/screen.c7
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/screen.c b/src/screen.c
index e37bf4838..fe366c995 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -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.
diff --git a/src/version.c b/src/version.c
index a60de4c16..5814b206f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 274,
+/**/
273,
/**/
272,