mirror of
https://github.com/anomalyco/opentui.git
synced 2026-09-19 01:26:03 +08:00
a84a0bac70
Selection combines half-open forward ranges with an inclusive backward workaround. Replaying a local selection can change its range, and extending by one display column can split a wide grapheme. Add an explicit occupancy model. Cell occupancy includes both endpoint graphemes for Vim-style behavior. Boundary occupancy uses a half-open range between insertion points. This behavior matches conventional thin cursors. Keep occupancy independent of cursor paint. Normalize endpoints to whole graphemes. This keeps highlighting, copied text, deletion, cursor sync, and wrapped-line navigation consistent in both directions. A press without movement keeps the selection empty. Preserve half-open offset selections. A cursor at the end of a line does not occupy the newline, but crossing the line boundary selects it. Supersedes the boundary-semantics direction of PR https://github.com/anomalyco/opentui/pull/1389.