selection: line-wise selection now handles soft line-wrapping

Previously, soft-wrapped lines were not selected correctly, as the
selection logic was hardcoded to simply select everything between the
first and last column on the current terminal row.

Now, we scan backward and forward, looking for hard-wrapped
lines. This is similar to how word-based selection works.

Closes #726
This commit is contained in:
Daniel Eklöf 2021-09-30 13:39:23 +02:00
parent df8aea6cb6
commit 548d7be4c6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 86 additions and 17 deletions

View file

@ -68,6 +68,8 @@
* Added workaround for GNOME bug where multiple button press events
(for the same button) is sent to the CSDs without any release or
leave events in between (https://codeberg.org/dnkl/foot/issues/709).
* Line-wise selection not taking soft line-wrapping into account
(https://codeberg.org/dnkl/foot/issues/726).
### Security