Skip to content

REPL table renderer: dispWidth counts codepoints, not display width (CJK/emoji misalign borders) #142

Description

@justrach

Follow-up from PR #127 (merged into release/v0.0.193, commit 16c9db7).

dispWidth in src/repl.zig advances by utf8ByteSequenceLength and counts every codepoint as width 1. East-Asian full-width characters (width 2) and emoji make the box-drawing borders (│ ┌ ┼ …) misalign in the TUI table renderer.

Fix: use an East-Asian-width table (wcwidth-style) so dispWidth returns 2 for wide codepoints. Affects column-width computation and cell padding in renderTable/renderRecords/wrapCell.

The GUI path is unaffected (browser handles glyph width). Non-blocking; TUI-only cosmetic misalignment for CJK/emoji content.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions