mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-06-13 14:33:17 -04:00
selection: fix block selection direction update
This patch fixes a condition check in selection_update(), so that during block selection, the selection area no longer gets incorrectly updated when selecting back across the starting column.
This commit is contained in:
parent
d7742d0312
commit
382e9a31c5
2 changed files with 3 additions and 1 deletions
|
|
@ -92,6 +92,8 @@
|
|||
* Require xkbcommon >= 1.6.0. This has been the case for a while, due
|
||||
to our use of `XKB_KEYSYM_MAX`. Now it is formalized in
|
||||
`meson.build` ([#2379][2379]).
|
||||
* Block selection area incorrectly updated when selecting back
|
||||
across the starting column.
|
||||
|
||||
[2353]: https://codeberg.org/dnkl/foot/issues/2353
|
||||
[2352]: https://codeberg.org/dnkl/foot/issues/2352
|
||||
|
|
|
|||
|
|
@ -1145,7 +1145,7 @@ selection_update(struct terminal *term, int col, int row)
|
|||
struct coord *pivot_end = &term->selection.pivot.end;
|
||||
|
||||
if (term->selection.kind == SELECTION_BLOCK) {
|
||||
if (new_end.col > pivot_start->col)
|
||||
if (new_end.col >= pivot_start->col)
|
||||
new_direction = SELECTION_RIGHT;
|
||||
else
|
||||
new_direction = SELECTION_LEFT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue