Repository navigation
Drop the unicode-width bound once ratatui counts halfwidth sound marks once #718
Copy link
Copy link
Open
Labels
choreMaintenance with no user-facing change, such as tooling or housekeeping (chore)Maintenance with no user-facing change, such as tooling or housekeeping (chore)dependenciesApplied to PRs that update dependencies, by Renovate or by handApplied to PRs that update dependencies, by Renovate or by hand
Description
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-widthbound inCargo.tomland its rule in.github/renovate.jsonare 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
mainstill 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, aswrap.rsdoes, 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_widthtests,halfwidth_dakuten_aloneandhalfwidth_katakana_with_dakuten, fail against unicode-width 0.2.3, while its committedCargo.lockstays 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::widthandLine::widthcount the cells ratatui renders.wrap.rsdecides whether a line fits throughLine::width, so that change would move this check onto ratatui's measure, while the grapheme loop that breaks long lines still calls unicode-width.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
choreMaintenance with no user-facing change, such as tooling or housekeeping (chore)Maintenance with no user-facing change, such as tooling or housekeeping (chore)dependenciesApplied to PRs that update dependencies, by Renovate or by handApplied to PRs that update dependencies, by Renovate or by hand
Activity
chore(deps): hold unicode-width below 0.2.3 so ratatui keeps sound ma…