fix(terminal): render halfwidth katakana voiced marks - #2257
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
5197d15 to
a230570
Compare
a230570 to
a7b51ab
Compare
Greptile SummaryThe PR preserves Ghostty’s halfwidth voiced-katakana graphemes and spacer tails through pane rendering, then accounts for their effective two-cell width in ANSI output.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/pane/terminal.rs | Preserves halfwidth voiced-katakana graphemes reported as wide and retains empty Ghostty SpacerTail symbols through pane and dirty-patch rendering. |
| src/protocol/render_ansi.rs | Treats the targeted grapheme pair as two cells so full and differential ANSI redraws avoid overwriting its covered tail. |
| src/server/headless.rs | Adjusts frame-comparison test helpers to recognize empty and space tail symbols as equivalent only when covered by a preceding wide cell. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
PTY[PTY bytes] --> Ghostty[Ghostty terminal]
Ghostty --> Head["Wide kana head: ガ"]
Ghostty --> Tail["SpacerTail: empty symbol"]
Head --> Pane[Pane / retained frame]
Tail --> Pane
Pane --> ANSI[ANSI blitter]
ANSI --> Width[Effective width = 2]
Width --> Host[Host terminal redraw skips covered tail]
Reviews (2): Last reviewed commit: "Merge branch 'master' into fix/halfwidth..." | Re-trigger Greptile
|
ty! |
Summary
Fix rendering for halfwidth katakana graphemes that use halfwidth voiced or semi-voiced marks, such as
ガギグゲゴandパピプペポ.Root Cause
Ghostty reports halfwidth katakana plus U+FF9E/U+FF9F as a wide cell with a spacer tail. Herdr previously normalized the grapheme through
unicode-width, which reports these strings as width 1, so the pane renderer could replace them with blanks.After preserving the grapheme, the ANSI blitter still treated it as width 1 and could draw the tail cell afterward, overwriting the voiced kana on the host terminal.
Changes
Docs
No public docs update needed. This is a terminal rendering bug fix and does not change documented commands, configuration, or workflows.
Validation
cargo fmt --checkcargo test halfwidth_katakana_voiced -- --nocapturecargo test halfwidth_voiced_kana -- --nocapture