From 1ec52b893a3934acbb88a2498824f2629b318046 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 4 Feb 2017 17:36:39 +0100 Subject: vim-patch:8.0.0274 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) https://github.com/vim/vim/commit/070b33da93ad3a191664bb61f5ccc50781460c03 --- src/nvim/screen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index c0db076eff..10a184ad5b 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -487,9 +487,10 @@ void 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) { @@ -507,6 +508,7 @@ void update_single_line(win_T *wp, linenr_T lnum) } } need_cursor_line_redraw = FALSE; + updating_screen = false; } -- cgit