patch 8.0.1815: crash with terminal window and with 'lazyredraw' set
Problem: Still a crash with terminal window and with 'lazyredraw' set.
(Antoine)
Solution: Do not wipe out the buffer when updating the screen.
diff --git a/src/screen.c b/src/screen.c
index cac5a3a..841dc18 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -514,6 +514,19 @@
#endif
}
+ void
+reset_updating_screen(int may_resize_shell UNUSED)
+{
+ updating_screen = FALSE;
+#ifdef FEAT_GUI
+ if (may_resize_shell)
+ gui_may_resize_shell();
+#endif
+#ifdef FEAT_TERMINAL
+ term_check_channel_closed_recently();
+#endif
+}
+
/*
* Update all windows that are editing the current buffer.
*/
@@ -778,10 +791,7 @@
FOR_ALL_WINDOWS(wp)
wp->w_buffer->b_mod_set = FALSE;
- updating_screen = FALSE;
-#ifdef FEAT_GUI
- gui_may_resize_shell();
-#endif
+ reset_updating_screen(TRUE);
/* Clear or redraw the command line. Done last, because scrolling may
* mess up the command line. */
@@ -861,11 +871,9 @@
end_search_hl();
# endif
- updating_screen = FALSE;
+ reset_updating_screen(TRUE);
# ifdef FEAT_GUI
- gui_may_resize_shell();
-
/* Redraw the cursor and update the scrollbars when all screen updating is
* done. */
if (gui.in_use)