patch 8.0.1100: stuck in redraw loop when 'lazyredraw' is set
Problem: Stuck in redraw loop when 'lazyredraw' is set.
Solution: Don't loop on update_screen() when not redrawing. (Yasuhiro
Matsumoto, closes #2082)
diff --git a/src/screen.c b/src/screen.c
index 42995c7..6ce478e 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -538,8 +538,9 @@
/*
* Based on the current value of curwin->w_topline, transfer a screenfull
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
+ * Return OK when the screen was updated, FAIL if it was not done.
*/
- void
+ int
update_screen(int type_arg)
{
int type = type_arg;
@@ -557,7 +558,7 @@
/* Don't do anything if the screen structures are (not yet) valid. */
if (!screen_valid(TRUE))
- return;
+ return FAIL;
if (type == VALID_NO_UPDATE)
{
@@ -589,7 +590,7 @@
must_redraw = type;
if (type > INVERTED_ALL)
curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */
- return;
+ return FAIL;
}
updating_screen = TRUE;
@@ -842,6 +843,7 @@
gui_update_scrollbars(FALSE);
}
#endif
+ return OK;
}
#if defined(FEAT_SIGNS) || defined(FEAT_GUI) || defined(FEAT_CONCEAL)