Skip to content

Drop the unicode-width bound once ratatui counts halfwidth sound marks once #718

Open

Description

@hakula139

Goal

Drop the unicode-width bound once ratatui counts each halfwidth katakana sound mark (U+FF9E, U+FF9F) as one cell with unicode-width 0.2.3 or later, so ox picks up new width tables again and measures these marks the way ratatui paints them.

ratatui-core 0.1.2 adds a cell to each mark in CellWidth (ratatui/ratatui#2499) because unicode-width used to count them as zero-width. unicode-width 0.2.3 counts them as one cell itself (unicode-rs/unicode-width#89), so with both, ratatui lays ガ out over three cells while terminals draw it in two. #711 hit this in testing::tests::buffer_rows::read_an_offset_area_and_skip_the_cells_wide_symbols_cover, and #717 holds unicode-width below 0.2.3 in Cargo.toml and .github/renovate.json until ratatui changes.

Acceptance criteria

  • A ratatui-core release measures ガ as two cells with unicode-width 0.2.3 or later.
  • The unicode-width bound in Cargo.toml and its rule in .github/renovate.json are gone, and the lock resolves unicode-width 0.2.3 or later with every test passing.

Notes

  • As of 2026-10-28, ratatui-core 0.1.2 is the latest release, ratatui's main still adds the cell, and no ratatui issue or PR reports the double count. Its manifest accepts any unicode-width from 0.2.0.
  • While the bound holds, ox's own layout code measures with unicode-width 0.2.2 directly, as wrap.rs does, and counts each mark as zero cells while ratatui paints one. Lifting the bound with a fixed ratatui brings both to one cell.
  • ratatui's own cell_width tests, halfwidth_dakuten_alone and halfwidth_katakana_with_dakuten, fail against unicode-width 0.2.3, while its committed Cargo.lock stays on 0.2.2. Its weekly grouped Dependabot update waits 7 days after a release, so the first one to bring in 0.2.3, from about 2026-11-04, should surface the double count there. Whether to report it upstream before then is the maintainer's call.
  • If a ratatui-core release starts requiring unicode-width 0.2.3 or later, it cannot resolve against the bound, so a failing Renovate Rust dependencies PR is also a cue to revisit this issue.
  • fix(core): make Span::width count the cells that get rendered ratatui/ratatui#2790 (open) would make Span::width and Line::width count the cells ratatui renders. wrap.rs decides whether a line fits through Line::width, so that change would move this check onto ratatui's measure, while the grapheme loop that breaks long lines still calls unicode-width.

Activity

  1. added
    dependenciesApplied to PRs that update dependencies, by Renovate or by hand
    choreMaintenance with no user-facing change, such as tooling or housekeeping (chore)
    on Oct 28, 2026
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

    choreMaintenance with no user-facing change, such as tooling or housekeeping (chore)dependenciesApplied to PRs that update dependencies, by Renovate or by hand

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions