Files
ghostty-rs/crates/ghostty-cli/Cargo.toml
T
ddidderr f687a8c585 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
2026-10-12 17:28:23 +02:00

39 lines
859 B
TOML

[package]
name = "ghostty-cli"
version.workspace = true
edition.workspace = true
license.workspace = true
[features]
# Select the FreeType-only font backend (no font discovery), like
# `-Dfont-backend=freetype`.
font-backend-freetype = ["ghostty-font/font-backend-freetype"]
[dependencies]
flate2 = "1.1.10"
ghostty-build-info.workspace = true
ghostty-apprt.workspace = true
ghostty-config.workspace = true
ghostty-crash.workspace = true
ghostty-font.workspace = true
ghostty-input.workspace = true
ghostty-os.workspace = true
ghostty-unicode.workspace = true
ghostty-vt.workspace = true
log = "0.4.34"
ratatui = "0.30.2"
termina = "0.3.3"
thiserror = "2.0.21"
unicode-width = "0.2.2"
unicode-segmentation = "1.13.3"
[build-dependencies]
ghostty-helpgen.workspace = true
[lints]
workspace = true
[dev-dependencies]
tempfile = "3.27.0"
temp-env = "0.3.6"