diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 00:45:31 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 84c2699e22d9660ef5b6de54643c0c78f2e8e855 (patch) | |
| tree | dc2851d34184ee695613a16b6e72efc45d1120de /src/tui/tui.zig | |
| parent | 191d0eca0ba25b94ce2b466cc11b879e7553473a (diff) | |
| download | pardes-84c2699e22d9660ef5b6de54643c0c78f2e8e855.tar.gz pardes-84c2699e22d9660ef5b6de54643c0c78f2e8e855.zip | |
width: back to libvaxis's gwidth, the user's ruling (keeping a dependency beats reimplementing it in the core): vmkopprq reverted: the core measures a grapheme's cells with vaxis.gwidth.gwidth(.unicode) again (File.graphemeDisplayWidth and its neighbours, surface.zig, draw.zig's test), File.utf8Width and tui.zig's corpus test that held vaxis's width to it go, and build.zig gives libvaxis to the core module again, so vaxis stays a dependency of the core; the widths were the same on every Unicode scalar value (vmkopprq's proof), so every golden and snapshot is unchanged; the changelog's shared entry keeps the palette sentence alone
Diffstat (limited to 'src/tui/tui.zig')
| -rw-r--r-- | src/tui/tui.zig | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig index b66a900f..4c0ded5b 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -3344,17 +3344,3 @@ test "the tty draws a glide at whole rows: once a flick or a spin slows, its ste try std.testing.expectEqual(row, (shown.cursor orelse return error.NoCursor).y); } } - -test "the tui's vaxis measures a grapheme as wide as the core lays it out" { - // vaxis renders a cell at gwidth(.unicode) in mode 2027; the core's - // File.utf8Width is that function over the same uucode tables. A vaxis - // that measures otherwise would draw past or short of the core's cells. - for ([_][]const u8{ - "a", "\u{4e16}", "e\u{301}", "\u{301}", - "\u{1f642}", "\u{1f44b}\u{1f3ff}", "\u{1f469}\u{200d}\u{1f680}", "\u{1f1fa}\u{1f1f8}", - "\u{1f1fa}", "\u{2764}\u{fe0e}", "\u{2764}\u{fe0f}", "1\u{fe0f}\u{20e3}", - "\u{1100}\u{1161}", "\u{ff21}", "\u{b1}", "\u{200b}", - "\u{ad}", "\u{fffd}", "\u{85}", "\x7f", - "a\u{4e16}\u{1f642}", "\u{e0100}", "\u{231a}", "\u{2600}", - }) |g| try std.testing.expectEqual(vaxis.gwidth.gwidth(g, .unicode), pardes.panes.File.utf8Width(g)); -} |
