selection: cancel: call selection_stop_scroll_timer()

Instead of re-implementing the same logic, simply call
selection_stop_scroll_timer().
This commit is contained in:
Daniel Eklöf 2020-10-11 18:24:47 +02:00
parent 674e565b5a
commit 0cff7c7c4f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -649,10 +649,7 @@ selection_cancel(struct terminal *term)
term->selection.start.row, term->selection.start.col,
term->selection.end.row, term->selection.end.col);
if (term->selection.auto_scroll.fd >= 0) {
fdm_del(term->fdm, term->selection.auto_scroll.fd);
term->selection.auto_scroll.fd = -1;
}
selection_stop_scroll_timer(term);
if (term->selection.start.row >= 0 && term->selection.end.row >= 0) {
foreach_selected(