]> granicus.if.org Git - vim/commitdiff
patch 8.0.1504: Win32: the screen may be cleared on startup v8.0.1504
authorBram Moolenaar <Bram@vim.org>
Sun, 11 Feb 2018 15:40:45 +0000 (16:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 11 Feb 2018 15:40:45 +0000 (16:40 +0100)
Problem:    Win32: the screen may be cleared on startup.
Solution:   Only call shell_resized() when the size actually changed. (Ken
            Takata, closes #2527)

src/os_win32.c
src/version.c

index 121ff2aa1b80571f6c107945b2b707ef6e0ff396..02f87102c1efaa40bdb8042e438d938d7d27d4cf 100644 (file)
@@ -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))
index 5c72d8d73d213cf51d8e47e387806b04f5172f1b..968f1e00d17e7d32bd4d474b5a15d4dbf0ec6955 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1504,
 /**/
     1503,
 /**/