changeset 13260:ee1a1276a759 v8.0.1504

patch 8.0.1504: Win32: the screen may be cleared on startup commit https://github.com/vim/vim/commit/c33ecb291518044f661c5fc10b704fc718321794 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 11 16:40:45 2018 +0100 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)
author Christian Brabandt <cb@256bit.org>
date Sun, 11 Feb 2018 16:45:05 +0100
parents f99dea69711d
children fa53b212be26
files src/os_win32.c src/version.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -1557,7 +1557,13 @@ WaitForChar(long msec, int ignore_input)
 	    if (ir.EventType == FOCUS_EVENT)
 		handle_focus_event(ir);
 	    else if (ir.EventType == WINDOW_BUFFER_SIZE_EVENT)
-		shell_resized();
+	    {
+		/* Only call shell_resized() when the size actually change to
+		 * avoid the screen is cleard. */
+		if (ir.Event.WindowBufferSizeEvent.dwSize.X != Columns
+			|| ir.Event.WindowBufferSizeEvent.dwSize.Y != Rows)
+		    shell_resized();
+	    }
 #ifdef FEAT_MOUSE
 	    else if (ir.EventType == MOUSE_EVENT
 		    && decode_mouse_event(&ir.Event.MouseEvent))
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1504,
+/**/
     1503,
 /**/
     1502,