summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-05-11 22:01:51 +0200
committerBram Moolenaar <Bram@vim.org>2018-05-11 22:01:51 +0200
commit0cb8ac71ae42f66d525ad855db01361ca38d935a (patch)
treeb92519c8cf47222d59efc7c78bb4f47005f6e041 /src/screen.c
parenta10ae5e323f4ebe6620869f4f9b0812b78090915 (diff)
downloadvim-git-0cb8ac71ae42f66d525ad855db01361ca38d935a.tar.gz
patch 8.0.1815: crash with terminal window and with 'lazyredraw' setv8.0.1815
Problem: Still a crash with terminal window and with 'lazyredraw' set. (Antoine) Solution: Do not wipe out the buffer when updating the screen.
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/screen.c b/src/screen.c
index cac5a3a1f..841dc1866 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -514,6 +514,19 @@ redrawWinline(
#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 @@ update_screen(int type_arg)
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 @@ update_finish(void)
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)