mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04: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);
|
free(url->key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
url_list_destroy(url_list_t *urls)
|
||||||
|
{
|
||||||
|
tll_foreach(*urls, it) {
|
||||||
|
url_destroy(&it->item);
|
||||||
|
tll_remove(*urls, it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
urls_reset(struct terminal *term)
|
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);
|
tag_cells_for_url(term, &it->item, false);
|
||||||
url_destroy(&it->item);
|
url_list_destroy(&term->urls);
|
||||||
tll_remove(term->urls, it);
|
|
||||||
}
|
|
||||||
|
|
||||||
term->urls_show_uri_on_jump_label = false;
|
term->urls_show_uri_on_jump_label = false;
|
||||||
memset(term->url_keys, 0, sizeof(term->url_keys));
|
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,
|
void url_activate(struct seat *seat, struct terminal *term,
|
||||||
const struct url *url, uint32_t serial);
|
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_assign_key_combos(const struct config *conf, url_list_t *urls);
|
||||||
|
|
||||||
void urls_render(struct terminal *term);
|
void urls_render(struct terminal *term);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue