зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-09-03 14:26:17 +03:00
Word-wrap previously emitted a phantom whitespace-only row when a word exactly filled a row and the input continued (e.g. "abcde fghij" at width 5 wrapped to 3 rows instead of 2). Separator whitespace that does not fit the remaining space is now handled like ratatui's WordWrapper (trim: false): whitespace filling the remaining cells is dropped, whitespace after an exactly full row is dropped one grapheme at a time, and any leftover whitespace leads the next row. wrapped_rows now keeps byte-accurate column bookkeeping so screen_map round-trips hold for all visible positions; positions inside dropped whitespace have no screen representation and are treated as such. Verified differentially against ratatui 0.30's WordWrapper (a faithful reference port cross-checked against the real Paragraph renderer): row counts now match for single- and multi-space separators, trailing whitespace, CJK and mixed-width inputs.
60 KiB
60 KiB