patch 9.1.1208: MS-Windows: not correctly restoring alternate screen on Win 10

Commit: 
https://github.com/vim/vim/commit/ab281f8b34c9d2184cae7c1f44f12e2faf8f6b16
Author: Christopher Plewright <ch...@createng.com>
Date:   Sun Mar 16 19:14:31 2025 +0100

    patch 9.1.1208: MS-Windows: not correctly restoring alternate screen on Win 
10
    
    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 <ch...@createng.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/os_win32.c b/src/os_win32.c
index eedd0a5ab..0ba4eedb9 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -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.
      */
diff --git a/src/version.c b/src/version.c
index 803bef596..fc9536f26 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1208,
 /**/
     1207,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1ttskO-00ESXC-24%40256bit.org.

Raspunde prin e-mail lui