fix(terminal): render halfwidth katakana voiced marks - #2257
fix(terminal): render halfwidth katakana voiced marks#2257kazunari-kamata wants to merge 1 commit into
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 SummaryThis PR fixes rendering of halfwidth katakana with voiced and semi-voiced marks across pane extraction and ANSI output.
Confidence Score: 5/5The PR appears safe to merge, with the pane and ANSI rendering changes consistently handling the wide grapheme head and its covered tail. The changed extraction and blitting paths agree that halfwidth voiced-kana graphemes occupy two cells, and the regression tests cover full rendering, retained dirty patches, and transitions during differential redraws.
|
| Filename | Overview |
|---|---|
| src/pane/terminal.rs | Preserves halfwidth voiced-kana graphemes and empty wide-cell tails in full and retained pane rendering, with focused regression tests. |
| src/protocol/render_ansi.rs | Adds specialized two-column accounting so full and differential ANSI redraws do not overwrite wide-kana spacer tails. |
| src/server/headless.rs | Updates frame-comparison test helpers to regard empty and space symbols as equivalent only when covered by a preceding wide cell. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Ghostty wide kana grapheme] --> B[Pane cell extraction]
B --> C[Preserve grapheme head]
B --> D[Preserve empty spacer tail]
C --> E[FrameData]
D --> E
E --> F[ANSI blitter]
F --> G[Treat grapheme as width 2]
G --> H[Skip covered tail cell]
Reviews (1): Last reviewed commit: "fix(terminal): render halfwidth katakana..." | Re-trigger Greptile
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