tty/tty.zig — writeCell early return on combining char encode failure leaves cx staletty/tty.zig — writeCell early return on combining char encode failure leaves cx staleFile: src/tty/tty.zig:386–395
Severity: MEDIUM
Status: ✅ FIXED — replaced catch return with fallback that writes ? and continues normal flow so self.cx is always incremented. Test added.
const clen = std.unicode.utf8Encode(cp, &buf) catch return;
try self.write(buf[0..clen]);
If utf8Encode fails for comb1 or comb2, the function returns immediately via catch return. The base character was already written to the terminal (advancing the hardware cursor), but self.cx is never incremented. The cached cursor position is now out of sync with the actual terminal cursor, causing incorrect positioning decisions in subsequent calls until the next explicit cursorMove.