mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #720] [MERGED] utf8: fix wrap offsets at SIMD boundaries #1519
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1519
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/720
Author: @simonklee
Created: 2/20/2026
Status: ✅ Merged
Merged: 2/21/2026
Merged by: @kommander
Base:
main← Head:simd-grapheme-accounting📝 Commits (1)
769c3e6utf8: fix wrap offsets at SIMD boundaries📊 Changes
4 files changed (+187 additions, -3 deletions)
View changed files
📝
packages/core/src/zig/tests/text-buffer-view_test.zig(+58 -0)📝
packages/core/src/zig/text-buffer-view.zig(+1 -0)📝
packages/core/src/zig/utf8.zig(+3 -3)📝
packages/solid/tests/scrollbox-content.test.tsx(+125 -0)📄 Description
When a multibyte sequence starts near the end of a mixed SIMD block,
wrap scanning can advance past bytes it did not consume. That skews char
offsets and break points, so word wrapping may split a word across
lines.
Keep scanning aligned with processed bytes and keep grapheme state across
fast-path transitions.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.