mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-10 04:27:45 -05:00
url-mode: add new (public) function url_list_destroy()
This commit is contained in:
parent
116b8fa635
commit
8b882b3a13
2 changed files with 14 additions and 4 deletions
15
url-mode.c
15
url-mode.c
|
|
@ -826,6 +826,15 @@ url_destroy(struct url *url)
|
|||
free(url->key);
|
||||
}
|
||||
|
||||
void
|
||||
url_list_destroy(url_list_t *urls)
|
||||
{
|
||||
tll_foreach(*urls, it) {
|
||||
url_destroy(&it->item);
|
||||
tll_remove(*urls, it);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
urls_reset(struct terminal *term)
|
||||
{
|
||||
|
|
@ -855,11 +864,9 @@ urls_reset(struct terminal *term)
|
|||
}
|
||||
}
|
||||
|
||||
tll_foreach(term->urls, it) {
|
||||
tll_foreach(term->urls, it)
|
||||
tag_cells_for_url(term, &it->item, false);
|
||||
url_destroy(&it->item);
|
||||
tll_remove(term->urls, it);
|
||||
}
|
||||
url_list_destroy(&term->urls);
|
||||
|
||||
term->urls_show_uri_on_jump_label = false;
|
||||
memset(term->url_keys, 0, sizeof(term->url_keys));
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ void urls_collect(
|
|||
|
||||
void url_activate(struct seat *seat, struct terminal *term,
|
||||
const struct url *url, uint32_t serial);
|
||||
|
||||
void url_list_destroy(url_list_t *urls);
|
||||
|
||||
void urls_assign_key_combos(const struct config *conf, url_list_t *urls);
|
||||
|
||||
void urls_render(struct terminal *term);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue