From 4cb17f5ae65e129765794986d36fbfc33c0c65bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 24 Dec 2025 11:33:28 +0100 Subject: [PATCH] csi: make sure the ASCII printer function is updated on plain underlines Otherwise, a sequence like \E[4:2;4m # Enable double-underline, then immediately switch to single Will switch to the slow printer, and then get stuck there even though we immediately switch to plain underlines (which don't need the slow printer). --- csi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csi.c b/csi.c index 7e0cf464..0cf8e203 100644 --- a/csi.c +++ b/csi.c @@ -117,9 +117,9 @@ csi_sgr(struct terminal *term) style > UNDERLINE_SINGLE; break; } - - term_update_ascii_printer(term); - } + } else + term->bits_affecting_ascii_printer.underline_style = false; + term_update_ascii_printer(term); break; } case 5: term->vt.attrs.blink = true; break;