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
parent 2d11b36a24
commit 63270d5c06
No known key found for this signature in database
GPG key ID: 250FCE3001350BCA
2 changed files with 12 additions and 0 deletions

View file

@ -73,6 +73,12 @@
## Unreleased
### Added
### Changed
* No longer copies empty text after selection ([#2327][2327]).
[2327]: https://codeberg.org/dnkl/foot/issues/2327
### Deprecated
### Removed
### Fixed