mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
selection: finalize: clear ongoing selection
Check for ongoing selection, and *clear* it before bailing out due to the selection not having an end-point. This fixes an issue where a selection was kept as ongoing, even though the button had been released. Typically triggered by clicking without moving the mouse; this started a new selection, then (tried to) finalize it, but failed since the selection didn't have an end-point.
This commit is contained in:
parent
cddeaa2c1c
commit
9517c6443c
1 changed files with 3 additions and 3 deletions
|
|
@ -567,14 +567,14 @@ selection_extend(struct seat *seat, struct terminal *term,
|
|||
void
|
||||
selection_finalize(struct seat *seat, struct terminal *term, uint32_t serial)
|
||||
{
|
||||
if (term->selection.start.row < 0 || term->selection.end.row < 0)
|
||||
return;
|
||||
|
||||
if (!term->selection.ongoing)
|
||||
return;
|
||||
|
||||
term->selection.ongoing = false;
|
||||
|
||||
if (term->selection.start.row < 0 || term->selection.end.row < 0)
|
||||
return;
|
||||
|
||||
assert(term->selection.start.row != -1);
|
||||
assert(term->selection.end.row != -1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue