Skip to content

Commit c33ecb2

Browse files
committed
patch 8.0.1504: Win32: the screen may be cleared on startup
Problem: Win32: the screen may be cleared on startup. Solution: Only call shell_resized() when the size actually changed. (Ken Takata, closes #2527)
1 parent cdd09aa commit c33ecb2

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/os_win32.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,13 @@ WaitForChar(long msec, int ignore_input)
15571557
if (ir.EventType == FOCUS_EVENT)
15581558
handle_focus_event(ir);
15591559
else if (ir.EventType == WINDOW_BUFFER_SIZE_EVENT)
1560-
shell_resized();
1560+
{
1561+
/* Only call shell_resized() when the size actually change to
1562+
* avoid the screen is cleard. */
1563+
if (ir.Event.WindowBufferSizeEvent.dwSize.X != Columns
1564+
|| ir.Event.WindowBufferSizeEvent.dwSize.Y != Rows)
1565+
shell_resized();
1566+
}
15611567
#ifdef FEAT_MOUSE
15621568
else if (ir.EventType == MOUSE_EVENT
15631569
&& decode_mouse_event(&ir.Event.MouseEvent))

src/version.c

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

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1504,
774776
/**/
775777
1503,
776778
/**/

0 commit comments

Comments
 (0)