mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[PR #719] [MERGED] word navigation: honor CJK/ASCII boundaries #1514
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#1514
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/719
Author: @simonklee
Created: 2/20/2026
Status: ✅ Merged
Merged: 2/21/2026
Merged by: @kommander
Base:
main← Head:cjk-word-wrapping📝 Commits (5)
5880e95fix(textarea): honor CJK/ASCII boundaries in Ctrl+W deletes18a3d5etests/utf8_test.zigec53ae9edit-buffer: handle CJK word boundaries at script transitions2d69e53cleanup examples25bd76cMerge branch 'main' into cjk-word-wrapping📊 Changes
5 files changed (+594 additions, -2 deletions)
View changed files
📝
packages/core/src/renderables/__tests__/Textarea.keybinding.test.ts(+191 -0)📝
packages/core/src/zig/edit-buffer.zig(+23 -0)📝
packages/core/src/zig/tests/edit-buffer_test.zig(+166 -0)📝
packages/core/src/zig/tests/utf8_test.zig(+65 -2)📝
packages/core/src/zig/utf8.zig(+149 -0)📄 Description
Treat CJK and ASCII runs as separate word classes when computing wrap/word breaks, so backward word deletion stops at script transitions and keeps contiguous Hangul/CJK text grouped.
Currently just focused on correctness + regression lock-in only (mixed-script
boundaries, CJK punctuation, missing Han ranges), while keeping the existing shared
findWrapBreaks.Refactor later
Split editor word boundaries from wrap boundaries (
findWordBoundaries+word_offsets), then unify scanners behind better boundary metadata so wrap and editor semantics can chenage independently.Fix #596
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.