refactor: add a ‘range’ struct, grouping a start and end coord together

This commit is contained in:
Daniel Eklöf 2022-04-09 15:09:02 +02:00
parent c7dd30742a
commit 5b1f1602bc
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
7 changed files with 105 additions and 96 deletions

View file

@ -2121,8 +2121,9 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
auto_scroll_direction, selection_col);
}
if (term->selection.ongoing && (cursor_is_on_new_cell ||
term->selection.end.row < 0))
if (term->selection.ongoing && (
cursor_is_on_new_cell ||
term->selection.coords.end.row < 0))
{
selection_update(term, selection_col, selection_row);
}