From 2c17a8e727bc331eeb5ebe24bb978c1cfc9ff8df Mon Sep 17 00:00:00 2001 From: David Korth Date: Sat, 7 Jun 2025 14:16:33 -0400 Subject: [PATCH] [libgsvt] gsvt_win32.c: Clear bold and bright when setting "normal" intensity. (SGR 22) --- src/libgsvt/gsvt_win32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libgsvt/gsvt_win32.c b/src/libgsvt/gsvt_win32.c index 2a7a73ab2..51d90efe5 100644 --- a/src/libgsvt/gsvt_win32.c +++ b/src/libgsvt/gsvt_win32.c @@ -430,7 +430,7 @@ static int gsvt_win32_console_print_ANSI_emulate(gsvt_console *vt, const char *s // Operating System Command (OSC) // May be used for hyperlinks, but we can't easily support this // with regular Windows cmd, so skip it entirely. - // Search for a valid end sequence. + // Search for the end sequence: "\033\\" (ST) or "\007" (BEL) for (str++; *str != '\0'; str++) { if (str[0] == '\033' && str[1] == '\\') { // Found ST. @@ -534,6 +534,8 @@ static int gsvt_win32_console_print_ANSI_emulate(gsvt_console *vt, const char *s case 22: // Normal intensity wAttributes &= ~FOREGROUND_INTENSITY; + bold = false; + bright = false; break; case 24: // Not underline