From 2315aba458b662dcbb2ce4b8ceb3d9bfd14f4970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 31 Jan 2021 11:39:23 +0100 Subject: [PATCH] =?UTF-8?q?url-mode:=20urls=5Freset()=20do=20an=20early=20?= =?UTF-8?q?return=20if=20we=20don=E2=80=99t=20have=20any=20URLs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- url-mode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/url-mode.c b/url-mode.c index 0f23845c..170be4c9 100644 --- a/url-mode.c +++ b/url-mode.c @@ -321,6 +321,9 @@ urls_collect(struct terminal *term) void urls_reset(struct terminal *term) { + if (likely(tll_length(term->urls) == 0)) + return; + if (term->window != NULL) { tll_foreach(term->window->urls, it) { if (it->item.sub_surf != NULL)