]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.2099: win32: terminal codes clear the terminal v9.0.2099
authorNir Lichtman <nir@lichtman.org>
Sat, 11 Nov 2023 10:27:41 +0000 (11:27 +0100)
committerChristian Brabandt <cb@256bit.org>
Sat, 11 Nov 2023 10:33:43 +0000 (11:33 +0100)
Problem:  Terminal control codes¹ are sent even when silent
          mode is on, causing the terminal to clear up
Solution: Block any terminal codes when silent mode is on

¹https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences

fixes: #12822
closes: #13521

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/os_win32.c
src/version.c

index 92bc8c157f7e676fae575ee0b771e7d5374f4e20..2bf0fe712263d3f9c4f9fae9741bf32b7213fcab 100644 (file)
@@ -8578,6 +8578,9 @@ vtp_printf(
     DWORD   result;
     int            len;
 
+    if (silent_mode)
+       return 0;
+
     va_start(list, format);
     len = vim_vsnprintf((char *)buf, 100, (char *)format, list);
     va_end(list);
index a4cc2619d69db674b181068f02ab56448545cca0..e06b0864cfb6406f2c9101cffecd052f62dcc087 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2099,
 /**/
     2098,
 /**/