comparison src/os_win32.c @ 33749:89569bd907fc v9.0.2099

patch 9.0.2099: win32: terminal codes clear the terminal Commit: https://github.com/vim/vim/commit/6cd2d1df92718853a83d811cc2d29108e8c13139 Author: Nir Lichtman <nir@lichtman.org> Date: Sat Nov 11 11:27:41 2023 +0100 patch 9.0.2099: win32: terminal codes clear the terminal 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>
author Christian Brabandt <cb@256bit.org>
date Sat, 11 Nov 2023 11:45:03 +0100
parents ed8db57d1034
children 46ebf4ffad49
comparison
equal deleted inserted replaced
33748:7544cdfdbf6a 33749:89569bd907fc
8576 char_u buf[100]; 8576 char_u buf[100];
8577 va_list list; 8577 va_list list;
8578 DWORD result; 8578 DWORD result;
8579 int len; 8579 int len;
8580 8580
8581 if (silent_mode)
8582 return 0;
8583
8581 va_start(list, format); 8584 va_start(list, format);
8582 len = vim_vsnprintf((char *)buf, 100, (char *)format, list); 8585 len = vim_vsnprintf((char *)buf, 100, (char *)format, list);
8583 va_end(list); 8586 va_end(list);
8584 WriteConsoleA(g_hConOut, buf, (DWORD)len, &result, NULL); 8587 WriteConsoleA(g_hConOut, buf, (DWORD)len, &result, NULL);
8585 return (int)result; 8588 return (int)result;