Skip to content

Full-width Unicode is not supported #2

Description

@sebseager

Double-width UTF-encoded symbols (e.g., emojis, full-width East Asian chars, etc.) don't render properly, as all characters are expected to have a width of 1. To see this, change rx += 1 to rx += 2 in cx_to_rx, and cur_rx += 1 to cur_rx += 2 in rx_to_cx. The cursor will position correctly when adding an emoji, for instance, but will break for single-width Unicode chars.

Sounds like we need to use wcwidth and wcswidth to get the actual width of these when rendering.

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