Skip to content

Commit 847a5d6

Browse files
committed
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.
1 parent 1072768 commit 847a5d6

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/term.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3425,11 +3425,15 @@ set_shellsize(int width, int height, int mustset)
34253425

34263426
if (State == HITRETURN || State == SETWSIZE)
34273427
{
3428-
/* postpone the resizing */
3428+
// postpone the resizing
34293429
State = SETWSIZE;
34303430
return;
34313431
}
34323432

3433+
if (updating_screen)
3434+
// resizing while in update_screen() may cause a crash
3435+
return;
3436+
34333437
/* curwin->w_buffer can be NULL when we are closing a window and the
34343438
* buffer has already been closed and removing a scrollbar causes a resize
34353439
* event. Don't resize then, it will happen after entering another buffer.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ static char *(features[]) =
777777

778778
static int included_patches[] =
779779
{ /* Add new patch number below this line */
780+
/**/
781+
1664,
780782
/**/
781783
1663,
782784
/**/

0 commit comments

Comments
 (0)