user: fix text selection on wrapped lines

scroll_pane: screen_to_item() now properly accounts for wrapped
lines using textwrap to compute actual character positions instead
of just using mouse_x directly.

selectable: new module with PUA markers for wrap-aware selection.
Not yet integrated into chat.rs but ready for future use. Uses
continuation markers to track logical vs visual lines.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-12 15:49:57 -04:00
parent ab0f16a3b5
commit dcd647764c
5 changed files with 632 additions and 1 deletions

View file

@ -75,6 +75,9 @@ tokio-rustls = "0.26"
rustls-native-certs = "0.8"
serde_urlencoded = "0.7"
rusqlite = { version = "0.37", features = ["bundled"] }
textwrap = "0.16"
[build-dependencies]
capnpc = "0.25"