mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
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.
This commit is contained in:
10
src/screen.c
10
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
|
||||
|
Reference in New Issue
Block a user