]> granicus.if.org Git - vim/commitdiff
patch 8.1.0323: reverse order of VTP calls only needed the first time v8.1.0323
authorBram Moolenaar <Bram@vim.org>
Thu, 23 Aug 2018 20:38:31 +0000 (22:38 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 23 Aug 2018 20:38:31 +0000 (22:38 +0200)
Problem:    Reverse order of VTP calls only needed the first time.
Solution:   Add a flag to remember the state. (Nobuhiro Takasaki, closes #3366)

src/os_win32.c
src/version.c

index dc98d6acd24aeec776d9b046da9878b5504568d0..2cfcecfc1ce427ed5138aac6f06ec13a68cb3581 100644 (file)
@@ -4046,6 +4046,7 @@ ResizeConBufAndWindow(
     CONSOLE_SCREEN_BUFFER_INFO csbi;   /* hold current console buffer info */
     SMALL_RECT     srWindowRect;       /* hold the new console size */
     COORD          coordScreen;
+    static int     resized = FALSE;
 
 #ifdef MCH_WRITE_DUMP
     if (fdDump)
@@ -4091,8 +4092,8 @@ ResizeConBufAndWindow(
     coordScreen.X = xSize;
     coordScreen.Y = ySize;
 
-    // In the new console call API in reverse order
-    if (!vtp_working)
+    // In the new console call API, only the first time in reverse order
+    if (!vtp_working || resized)
     {
        ResizeWindow(hConsole, srWindowRect);
        ResizeConBuf(hConsole, coordScreen);
@@ -4101,6 +4102,7 @@ ResizeConBufAndWindow(
     {
        ResizeConBuf(hConsole, coordScreen);
        ResizeWindow(hConsole, srWindowRect);
+       resized = TRUE;
     }
 }
 
index 919d790fa1bc6ad7e6c3738cd1630de5247cedfe..01854c85cb811248802a7c573232d0cc972ca7e2 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    323,
 /**/
     322,
 /**/