input: call selection_finalize() when BTN_LEFT is released

This commit is contained in:
Daniel Eklöf 2019-07-11 11:10:53 +02:00
parent e7e199d6b5
commit 0facfa4da7
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -353,6 +353,8 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
case WL_POINTER_BUTTON_STATE_RELEASED:
if (button == BTN_LEFT && term->selection.end.col == -1)
selection_cancel(term);
else
selection_finalize(term);
term->mouse.button = 0; /* For motion events */
term_mouse_up(term, button, term->mouse.row, term->mouse.col,