pi-mono/packages
Petr Houška dfe47d3fbd
fix(tui): align grapheme widths with terminal cells (#6987)
Intl.Segmenter can group Indic conjuncts and spacing marks into one grapheme even when wcwidth-style terminals allocate multiple cells. Count visible consonants after marks and Unicode spacing marks separately while preserving zero-width exceptions.

This is a compatibility heuristic. Unicode Spacing_Mark indicates positive advance, not a full terminal cell; Kitty keeps many Indic continuations in the initial cell, while xterm-style terminals advance for them, so Pi overcounts some clusters in Kitty.

Overcounting causes horizontal drift, but undercounting can trigger terminal autowrap, so this change favors overcounting.

Clusters can contain repeated marks and mark-consonant continuations, so this implementation leaves their widths uncapped. Collapsing them would undercount terminals that advance for every visible continuation.

Mode 2027 does not report cluster widths, so Pi still needs local width calculations. This change does not implement OSC 66, which would be preferable where supported.

Fixes #6124

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-07-30 22:25:46 +02:00
..
agent fix(agent): preserve waitForIdle semantics 2026-07-30 22:22:47 +03:00
ai fix(ai): support streams without finish reasons 2026-07-30 22:23:46 +02:00
coding-agent fix(ai): support streams without finish reasons 2026-07-30 22:23:46 +02:00
evals Merge pull request #7289 from earendil-works/worktree/evals-baseline 2026-07-30 11:46:45 +03:00
protocol docs(protocol): add package changelog 2026-07-30 22:33:15 +03:00
server Add [Unreleased] section for next cycle 2026-07-30 00:24:23 +02:00
storage/sqlite-node Add [Unreleased] section for next cycle 2026-07-30 00:24:23 +02:00
tui fix(tui): align grapheme widths with terminal cells (#6987) 2026-07-30 22:25:46 +02:00