]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1208: MS-Windows: not correctly restoring alternate screen on Win 10 v9.1.1208
authorChristopher Plewright <chris@createng.com>
Sun, 16 Mar 2025 18:14:31 +0000 (19:14 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 16 Mar 2025 18:14:31 +0000 (19:14 +0100)
Problem:  MS-Windows: not correctly restoring alternate screen on Win 10
          after ssh (Daniel Viberg)
Solution: return a bit later in RestoreConsoleBuffer()
          (Christopher Plewright)

fixes: #16418
closes: #16897

Signed-off-by: Christopher Plewright <chris@createng.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/os_win32.c
src/version.c

index eedd0a5aba625353915bec31c07b17a3dc082132..0ba4eedb94dff033ae97a688e240772905b15b4a 100644 (file)
@@ -3284,10 +3284,6 @@ RestoreConsoleBuffer(
     SMALL_RECT WriteRegion;
     int i;
 
-    // VTP uses alternate screen buffer.
-    // No need to restore buffer contents.
-    if (use_alternate_screen_buffer)
-       return TRUE;
 
     if (cb == NULL || !cb->IsValid)
        return FALSE;
@@ -3319,6 +3315,11 @@ RestoreConsoleBuffer(
     if (!SetConsoleWindowInfo(g_hConOut, TRUE, &cb->Info.srWindow))
        return FALSE;
 
+    // VTP uses alternate screen buffer.
+    // No need to restore buffer contents.
+    if (use_alternate_screen_buffer)
+       return TRUE;
+
     /*
      * Restore the screen buffer contents.
      */
index 803bef596afe127a16990df797e62f9847783e1b..fc9536f2688f720b839c6850b34db3b0942b0aa7 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1208,
 /**/
     1207,
 /**/