mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
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> |
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| coding-agent | ||
| evals | ||
| protocol | ||
| server | ||
| storage/sqlite-node | ||
| tui | ||