]> granicus.if.org Git - vim/commitdiff
patch 8.1.1664: GUI resize may cause changing Rows at a bad time v8.1.1664
authorBram Moolenaar <Bram@vim.org>
Fri, 12 Jul 2019 13:37:13 +0000 (15:37 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 12 Jul 2019 13:37:13 +0000 (15:37 +0200)
Problem:    GUI resize may cause changing Rows at a bad time. (Dominique
            Pelle)
Solution:   Postpone resizing while updating the screen.

src/term.c
src/version.c

index afa622e45f049c1d1224e8438cb83617ba5684f0..f1ccfcbfa3f8bfbb06e96587a3f9a09d2b71e8e2 100644 (file)
@@ -3425,11 +3425,15 @@ set_shellsize(int width, int height, int mustset)
 
     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.
index 7b779790de26688bee258e876b23e79a06bc6870..68b5465adbd82a6e70713c406eb6c798ad87b452 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1664,
 /**/
     1663,
 /**/