]> granicus.if.org Git - vim/commitdiff
patch 8.2.0490: Win32: VTP doesn't respect 'restorescreen' v8.2.0490
authorBram Moolenaar <Bram@vim.org>
Wed, 1 Apr 2020 16:29:10 +0000 (18:29 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 1 Apr 2020 16:29:10 +0000 (18:29 +0200)
Problem:    Win32: VTP doesn't respect 'restorescreen'.
Solution:   Use escape codes to switch to alternate screen. (Nobuhiro
            Takasaki, closes #5872)

src/os_win32.c
src/version.c

index 1952b3636bf6e6b71b5d4beffb3d65da16c2f9b4..77e43d5d39a6f5d254ff26189974ac2dd737a771 100644 (file)
@@ -5431,6 +5431,9 @@ termcap_mode_start(void)
     if (g_fTermcapMode)
        return;
 
+    if (!p_rs && USE_VTP)
+       vtp_printf("\033[?1049h");
+
     SaveConsoleBuffer(&g_cbNonTermcap);
 
     if (g_cbTermcap.IsValid)
@@ -5530,6 +5533,9 @@ termcap_mode_end(void)
        SetConsoleCursorPosition(g_hConOut, coord);
     }
 
+    if (!p_rs && USE_VTP)
+       vtp_printf("\033[?1049l");
+
     g_fTermcapMode = FALSE;
 }
 #endif // FEAT_GUI_MSWIN
index 43f9e5943514854c7943d342feb7401646a0468c..0353720775869117ecf4ab761a9d83840c7b6ecd 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    490,
 /**/
     489,
 /**/