selection: extend: use scrollback relative coordinates

When extending a selection, we determine *how* to extend it (which
endpoint to move, and whether to grow or shrink the selection) by
comparing the extension point with the old start and end coordinates.

For this to work correctly, we need to use scrollback relative
coordinates.

This fixes an issue where extending a very large selection (covering
many pages) sometimes shrunk the selection instead of growing it, or
just misbehaving in general.
This commit is contained in:
Daniel Eklöf 2022-07-28 18:32:17 +02:00
parent 6ebf55572e
commit b8506bbea0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 34 additions and 15 deletions

View file

@ -97,6 +97,7 @@
* Search matches ending with a double-width character not being
highlighted correctly.
* Selection not being cancelled correctly when scrolled out.
* Extending a multi-page selection behaving inconsistently.
[1055]: https://codeberg.org/dnkl/foot/issues/1055
[1092]: https://codeberg.org/dnkl/foot/issues/1092