helix/helix-term
Michael Davis d948ace67b
check selection's visible width when copying on mouse click (#2711)
* check selection's visible width when copying on mouse click

Mouse-click-up copies the selection produced by dragging. The event
is ignored if the selection has a width of 1 though so you don't
copy when clicking rather than dragging. The current check copies
text when it has a visible width of 1 but is actually multiple
characters in the rope like a CRLF line-ending. With this change
we check the unicode width of the character(s) in the selection
rather than the range length, so clicking on a CRLF line-ending
does not copy.

* use range.fragment to simplify getting the primary selection width
2022-06-24 22:58:04 +09:00
..
src check selection's visible width when copying on mouse click (#2711) 2022-06-24 22:58:04 +09:00
tests replace phrase in tests 2022-06-19 00:00:31 -04:00
.gitignore
build.rs publish a source tarball with version and grammars (#1875) 2022-03-29 14:34:19 +09:00
Cargo.toml add test for ensuring the initial cursor on a newly opened file 2022-06-18 23:54:03 -04:00