From 0cff7c7c4f5fb5e4d141c97b55ccffdcc01a398d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 11 Oct 2020 18:24:47 +0200 Subject: [PATCH] selection: cancel: call selection_stop_scroll_timer() Instead of re-implementing the same logic, simply call selection_stop_scroll_timer(). --- selection.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/selection.c b/selection.c index 20ed011c..54a50ff4 100644 --- a/selection.c +++ b/selection.c @@ -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(