From 2047d42bc6cc49e8546a3027e8b2e55396c3ad0b Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 8 May 2022 20:27:00 -0400 Subject: [PATCH] regression in process_text_window() original code: if (linestart && (*cp & 0x80) != 0) { g_putch(*cp); end_glyphout(); linestart = FALSE; } else { (void) putchar(*cp); } new code: if (linestart) { if (SYMHANDLING(H_UTF8)) { /* FIXME: what is actually in that line? is it the \GNNNNNNNN or UTF-8? */ g_putch(*cp); } else if ((*cp & 0x80) != 0) { g_putch(*cp); end_glyphout(); } linestart = FALSE; } else { (void) putchar(*cp); } The new code didn't output a character if linestart was true and the character did not have bit 0x80 set. fixed code: if (linestart) { if (SYMHANDLING(H_UTF8)) { /* FIXME: what is actually in that line? is it the \GNNNNNNNN or UTF-8? */ g_putch(*cp); } else if ((*cp & 0x80) != 0) { g_putch(*cp); end_glyphout(); } else { (void) putchar(*cp); } linestart = FALSE; } else { (void) putchar(*cp); } --- win/tty/wintty.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/win/tty/wintty.c b/win/tty/wintty.c index f3d10a962..f2c36bf5c 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -2368,6 +2368,8 @@ process_text_window(winid window, struct WinDesc *cw) } else if ((*cp & 0x80) != 0) { g_putch(*cp); end_glyphout(); + } else { + (void) putchar(*cp); } linestart = FALSE; } else {