Mercurial > vim
diff src/screen.c @ 16835:7cade95272c4 v8.1.1419
patch 8.1.1419: listener callbacks may be called recursively
commit https://github.com/vim/vim/commit/68a4b04a8d2471adf9de595745437c7cf20b98d8
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 29 22:28:29 2019 +0200
patch 8.1.1419: listener callbacks may be called recursively
Problem: Listener callbacks may be called recursively.
Solution: Set "updating_screen" while listener callbacks are invoked.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 May 2019 22:30:06 +0200 |
parents | ce04ebdf26b8 |
children | 032d5335987e |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -506,8 +506,12 @@ redrawWinline( redraw_win_later(wp, VALID); } +/* + * To be called when "updating_screen" was set before and now the postponed + * side effects may take place. + */ void -reset_updating_screen(int may_resize_shell UNUSED) +after_updating_screen(int may_resize_shell UNUSED) { updating_screen = FALSE; #ifdef FEAT_GUI @@ -803,7 +807,7 @@ update_screen(int type_arg) FOR_ALL_WINDOWS(wp) wp->w_buffer->b_mod_set = FALSE; - reset_updating_screen(TRUE); + after_updating_screen(TRUE); /* Clear or redraw the command line. Done last, because scrolling may * mess up the command line. */ @@ -886,7 +890,7 @@ update_finish(void) end_search_hl(); # endif - reset_updating_screen(TRUE); + after_updating_screen(TRUE); # ifdef FEAT_GUI /* Redraw the cursor and update the scrollbars when all screen updating is