summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Takata <kentkt@csc.jp>2024-08-07 21:18:24 +0200
committerChristian Brabandt <cb@256bit.org>2024-08-07 21:18:24 +0200
commit568cbc92a6637ef9272490fb0361adb73f158cfc (patch)
tree1b0c123bbdf44fa84aee6d06f69f6621fee3b319
parente2d9b0d499d0504ba0e935024daf1cfa12e349c4 (diff)
patch 9.1.0664: MS-Windows: console vim did not switch back to main screen on exitv9.1.0664
Problem: MS-Windows: console vim did not switch back to main screen on exit Solution: switch back to main screen on exit (Ken Takata) `vim.exe --cmd quit` quitted without switching back to the main screen buffer and the alternate screen buffer was kept shown. Restore the main screen buffer even when termcap mode has not been started. closes: #15443 Signed-off-by: Ken Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--src/os_win32.c8
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 44d92c0f4a..6384ac8736 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -3561,6 +3561,10 @@ mch_exit_c(int r)
vtp_exit();
stoptermcap();
+ // Switch back to main screen buffer.
+ if (use_alternate_screen_buffer)
+ vtp_printf("\033[?1049l");
+
if (g_fWindInitCalled)
settmode(TMODE_COOK);
@@ -6334,10 +6338,6 @@ termcap_mode_end(void)
RestoreConsoleBuffer(cb, p_rs);
restore_console_color_rgb();
- // Switch back to main screen buffer.
- if (exiting && use_alternate_screen_buffer)
- vtp_printf("\033[?1049l");
-
if (!USE_WT && (p_rs || exiting))
{
/*
diff --git a/src/version.c b/src/version.c
index c4ade6f4f6..ce5894f89a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 664,
+/**/
663,
/**/
662,