fix(copy-mode): harden wide-glyph h/l and align width source - #62
Conversation
Use ghostty unicode_codepoint_width in row_cell_glyphs, and treat cursors on trailing cells of wide glyphs as inside-glyph for next/prev steps so motion cannot stick on spacers at the right margin. refs #1000 Co-authored-by: OnlineChef <OnlineChef@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughCopy-mode cursor horizontal stepping now uses Ghostty’s glyph cell widths. Movement across wide and combined glyphs handles trailing cells explicitly, including right-edge behavior, with updated unit test expectations. ChangesCopy-mode cursor movement
Estimated code review effort: 3 (Moderate) | ~15–30 minutes Suggested reviewers: Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: OnlineChef <OnlineChef@users.noreply.github.com>
Summary
Follow-up to the CJK copy-mode horizontal motion work (upstream #1469 / #1000).
row_cell_glyphsthroughcrate::ghostty::unicode_codepoint_widthso it matcheslast_character_col/char_cell_widthnext_cell_col/prev_cell_colwhen the cursor sits on a wide glyph’s trailing cellMulti-model review
Addresses consensus findings from parallel Grok review of upstream #1469 (
caution→ ship blockers for width API + trailing-cell behavior).Validation
Local
cargo/just checkare forbidden in this environment. Rely on CI (gh pr checks).Greptile Summary
This PR updates copy-mode horizontal movement for wide glyphs. The main changes are:
handlmovement.Confidence Score: 5/5
This PR appears safe to merge.
The change is localized to copy-mode horizontal cursor stepping and uses the same width source as related helpers. The added tests cover the affected wide-glyph and combining-mark cases. No functional or security issues were identified.
No files require special attention.
What T-Rex did
Important Files Changed
Sequence Diagram
Reviews (1): Last reviewed commit: "style(copy-mode): rustfmt wide-glyph hel..." | Re-trigger Greptile