mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-11 05:33:55 -04:00
url-mode: urls_reset() do an early return if we don’t have any URLs
This commit is contained in:
parent
d75688b0bd
commit
2315aba458
1 changed files with 3 additions and 0 deletions
|
|
@ -321,6 +321,9 @@ urls_collect(struct terminal *term)
|
||||||
void
|
void
|
||||||
urls_reset(struct terminal *term)
|
urls_reset(struct terminal *term)
|
||||||
{
|
{
|
||||||
|
if (likely(tll_length(term->urls) == 0))
|
||||||
|
return;
|
||||||
|
|
||||||
if (term->window != NULL) {
|
if (term->window != NULL) {
|
||||||
tll_foreach(term->window->urls, it) {
|
tll_foreach(term->window->urls, it) {
|
||||||
if (it->item.sub_surf != NULL)
|
if (it->item.sub_surf != NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue