mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #512] [CLOSED] fix(utf8): use col_offset for CJK word wrap boundary detection #589
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#589
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/512
Author: @kskang
Created: 1/11/2026
Status: ❌ Closed
Base:
main← Head:fix/cjk-col-offset📝 Commits (1)
02572b3fix: use col_offset for CJK word wrap boundary detection📊 Changes
5 files changed (+44 additions, -6 deletions)
View changed files
📝
packages/core/src/zig/buffer.zig(+2 -2)📝
packages/core/src/zig/edit-buffer.zig(+2 -2)📝
packages/core/src/zig/tests/text-buffer-drawing_test.zig(+26 -0)📝
packages/core/src/zig/text-buffer-view.zig(+2 -2)📝
packages/core/src/zig/utf8.zig(+12 -0)📄 Description
CJK characters have display width 2. But the code counted them as width 1 when calculating word wrap boundaries. This caused incorrect wrap positions.
Changes
col_offsetfield toWrapBreakstruct. This field tracks display column position.col_offsetinstead ofchar_offsetin wrap boundary detection.Test
Fixes #255
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.