diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-02-04 17:36:39 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-02-04 17:43:42 +0100 |
commit | 1ec52b893a3934acbb88a2498824f2629b318046 (patch) | |
tree | 96d1027374d08032041543d26a96b01fafd800a6 | |
parent | bb2f36d038ccb375249a078997f68840ddcc66ef (diff) | |
download | rneovim-1ec52b893a3934acbb88a2498824f2629b318046.tar.gz rneovim-1ec52b893a3934acbb88a2498824f2629b318046.tar.bz2 rneovim-1ec52b893a3934acbb88a2498824f2629b318046.zip |
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
-rw-r--r-- | src/nvim/screen.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |