From eff8481cdc6c37407faaa3167ea6f6897b12f544 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 2 Feb 2021 09:52:22 +0100 Subject: selection: remove selection_enabled() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Its name did not reflect its semantics. Since it was only used in a single place, “inline” it there, and get rid of it. --- selection.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'selection.c') diff --git a/selection.c b/selection.c index e9c3fce6..90c6c392 100644 --- a/selection.c +++ b/selection.c @@ -33,16 +33,6 @@ static const char *const mime_type_map[] = { [DATA_OFFER_MIME_URI_LIST] = "text/uri-list", }; -bool -selection_enabled(const struct terminal *term, struct seat *seat) -{ - return - seat->mouse.col >= 0 && seat->mouse.row >= 0 && - (term->mouse_tracking == MOUSE_NONE || - term_mouse_grabbed(term, seat) || - term->is_searching); -} - bool selection_on_rows(const struct terminal *term, int row_start, int row_end) { -- cgit v1.3