Mercurial > vim
changeset 10769:dd93e5439ffd v8.0.0274
patch 8.0.0274: possible recursive screen updating causes trouble
commit https://github.com/vim/vim/commit/070b33da93ad3a191664bb61f5ccc50781460c03
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 31 21:53:39 2017 +0100
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 31 Jan 2017 22:00:04 +0100 |
parents | 14c7e1c23ebb |
children | 52c8f9e0feac |
files | src/screen.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -824,8 +824,9 @@ update_single_line(win_T *wp, linenr_T l 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 l # 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.