selection: extending a selection is now interactive

That is, a selection extension can be resized just like an ordinary
extension.
This commit is contained in:
Daniel Eklöf 2020-07-27 16:44:41 +02:00
parent 50bd51c4d4
commit 7127a0a6c3
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 12 additions and 10 deletions

View file

@ -1171,7 +1171,7 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
if (col < 0 || row < 0 || col >= term->cols || row >= term->rows)
return;
bool update_selection = seat->mouse.button == BTN_LEFT;
bool update_selection = seat->mouse.button == BTN_LEFT || seat->mouse.button == BTN_RIGHT;
bool update_selection_early = term->selection.end.row == -1;
if (update_selection && update_selection_early)