From 96c69c9f9b92651d024107f311967dd2dd88dae0 Mon Sep 17 00:00:00 2001 From: Jacob Sandlund Date: Mon, 24 Nov 2025 10:07:50 -0500 Subject: [PATCH] Add comment for desired_wide = .wide when !width_zero_in_grapheme --- src/terminal/Terminal.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/terminal/Terminal.zig b/src/terminal/Terminal.zig index 055ab95f4..b6cd8343e 100644 --- a/src/terminal/Terminal.zig +++ b/src/terminal/Terminal.zig @@ -402,6 +402,12 @@ pub fn print(self: *Terminal, c: u21) !void { else => unreachable, } } else if (!unicode.table.get(c).width_zero_in_grapheme) { + // If we have a code point that contributes to the width of a + // grapheme, it necessarily means that we're at least at width + // 2, since the first code point must be at least width 1 to + // start. (Note that Prepend code points could effectively mean + // the first code point should be width 0, but we don't handle + // that yet.) desired_wide = .wide; }