1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2019-07-12 15:37:13 +02:00
parent 1072768b91
commit 847a5d69a8
2 changed files with 7 additions and 1 deletions

View File

@@ -3425,11 +3425,15 @@ set_shellsize(int width, int height, int mustset)
if (State == HITRETURN || State == SETWSIZE) if (State == HITRETURN || State == SETWSIZE)
{ {
/* postpone the resizing */ // postpone the resizing
State = SETWSIZE; State = SETWSIZE;
return; 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 /* 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 * buffer has already been closed and removing a scrollbar causes a resize
* event. Don't resize then, it will happen after entering another buffer. * event. Don't resize then, it will happen after entering another buffer.

View File

@@ -777,6 +777,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1664,
/**/ /**/
1663, 1663,
/**/ /**/