selection: do not copy empty text

Copy-on-select (configured with 'selection-target') may accidentally
clear the clipboard, if the user drags the mouse a little bit when
clicking inside a terminal window.

Now we only copy if there is actual text being selected.

Closes #2327
This commit is contained in:
CismonX 2026-05-21 02:38:16 +08:00 committed by Daniel Eklöf
parent b18d8aa2f1
commit 4bf60d0fbc
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 8 additions and 0 deletions

View file

@ -81,9 +81,11 @@
content ([#2353][2353]).
* DECCRA not clamping or verifying the destination rectangle
([#2352][2352]).
* Empty selection clearing the clipboard ([#2327][2327]).
[2353]: https://codeberg.org/dnkl/foot/issues/2353
[2352]: https://codeberg.org/dnkl/foot/issues/2352
[2327]: https://codeberg.org/dnkl/foot/issues/2327
### Security