changeset 17330:b2918bd457cb v8.1.1664

patch 8.1.1664: GUI resize may cause changing Rows at a bad time commit https://github.com/vim/vim/commit/847a5d69a826c02a7cb8a14884f3fef69d74fed7 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 12 15:37:13 2019 +0200 patch 8.1.1664: GUI resize may cause changing Rows at a bad time Problem: GUI resize may cause changing Rows at a bad time. (Dominique Pelle) Solution: Postpone resizing while updating the screen.
author Bram Moolenaar <Bram@vim.org>
date Fri, 12 Jul 2019 15:45:05 +0200
parents 427bf9d4e0fb
children c3dcc589da00
files src/term.c src/version.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -3425,11 +3425,15 @@ set_shellsize(int width, int height, int
 
     if (State == HITRETURN || State == SETWSIZE)
     {
-	/* postpone the resizing */
+	// postpone the resizing
 	State = SETWSIZE;
 	return;
     }
 
+    if (updating_screen)
+	// resizing while in update_screen() may cause a crash
+	return;
+
     /* curwin->w_buffer can be NULL when we are closing a window and the
      * buffer has already been closed and removing a scrollbar causes a resize
      * event. Don't resize then, it will happen after entering another buffer.
--- a/src/version.c
+++ b/src/version.c
@@ -778,6 +778,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1664,
+/**/
     1663,
 /**/
     1662,