Feature hasn't been suggested before.
Describe the enhancement you want to request
The TUI textarea's word navigation (Option+Arrow / Ctrl+Arrow) treats contiguous non-whitespace as a single word. For CJK text like 你好世界hello, pressing Option+Right jumps over the entire block instead of stopping at each word boundary (你好 → 世界 → hello).
This happens because the underlying Zig word boundary logic has no awareness of CJK word segmentation — it only splits on whitespace.
Proposed solution: Use Intl.Segmenter(undefined, { granularity: 'word' }) (built into Bun/modern runtimes) to replace the four word-movement methods on TextareaRenderable at runtime. This gives proper ICU-based word boundaries for CJK text while keeping ASCII behavior identical.
Related PRs for context:
Feature hasn't been suggested before.
Describe the enhancement you want to request
The TUI textarea's word navigation (
Option+Arrow/Ctrl+Arrow) treats contiguous non-whitespace as a single word. For CJK text like你好世界hello, pressingOption+Rightjumps over the entire block instead of stopping at each word boundary (你好→世界→hello).This happens because the underlying Zig word boundary logic has no awareness of CJK word segmentation — it only splits on whitespace.
Proposed solution: Use
Intl.Segmenter(undefined, { granularity: 'word' })(built into Bun/modern runtimes) to replace the four word-movement methods onTextareaRenderableat runtime. This gives proper ICU-based word boundaries for CJK text while keeping ASCII behavior identical.Related PRs for context: