fix(cli): draw grapheme clusters whole in the theme preview
The +list-themes interactive preview dropped the second emoji of ZWJ clusters (e.g. woman + ZWJ + rocket) in the search box. Zig's libvaxis enables Unicode grapheme mode 2027 for its session and sizes text per grapheme cluster; the Rust preview did neither, so the terminal split the cluster at the ZWJ and the cursor column was computed from summed per-codepoint widths (4 instead of 2). - The preview sends ?2027h on entry and ?2027l on exit like vaxis. - tui::gwidth follows vaxis's unicode width rules per grapheme cluster (VS15/VS16, emoji presentation, regional-indicator pairs) using the ghostty-unicode emoji table; the preview's print path uses it. +list-colors and +list-keybinds pretty output (also using gwidth) stays byte-identical to /usr/bin/ghostty at widths 40/80/132. Test Plan: - cargo test -p ghostty-cli --test list_themes_pty zwj_emoji_cluster_is_drawn_whole_in_search_box - cargo test --workspace --no-fail-fast
This commit is contained in:
1 parent
a7e8eb0ac6
commit
46a2070d89
5 files changed
+84
-5
No files matched your search
Generated
+1
@@ -1436,6 +1436,7 @@ dependencies = [
|
||||
"ghostty-helpgen",
|
||||
"ghostty-input",
|
||||
"ghostty-os",
|
||||
"ghostty-unicode",
|
||||
"ghostty-vt",
|
||||
"log",
|
||||
"ratatui",
|
||||
|
||||
Reference in new issue
Block a user