url-mode: urls_reset() do an early return if we don’t have any URLs

This commit is contained in:
Daniel Eklöf 2021-01-31 11:39:23 +01:00
parent d75688b0bd
commit 2315aba458
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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)