diff --git a/src/config/options.c b/src/config/options.c index 78269858e..b787e5464 100644 --- a/src/config/options.c +++ b/src/config/options.c @@ -953,7 +953,7 @@ change_hook_insert_mode(struct session *ses, struct option *current, struct opti static int change_hook_active_link(struct session *ses, struct option *current, struct option *changed) { - update_cached_document_options(); + update_cached_document_options(ses); return 0; } diff --git a/src/document/document.c b/src/document/document.c index c18bc997b..d65dca2ab 100644 --- a/src/document/document.c +++ b/src/document/document.c @@ -211,18 +211,18 @@ get_document_css_magic(struct document *document) #endif void -update_cached_document_options(void) +update_cached_document_options(struct session *ses) { struct document *document; struct active_link_options active_link; memset(&active_link, 0, sizeof(active_link)); /* Safer. */ - active_link.fg = get_opt_color("document.browse.links.active_link.colors.text", NULL); - active_link.bg = get_opt_color("document.browse.links.active_link.colors.background", NULL); - active_link.color = get_opt_bool("document.browse.links.active_link.enable_color", NULL); - active_link.invert = get_opt_bool("document.browse.links.active_link.invert", NULL); - active_link.underline = get_opt_bool("document.browse.links.active_link.underline", NULL); - active_link.bold = get_opt_bool("document.browse.links.active_link.bold", NULL); + active_link.fg = get_opt_color("document.browse.links.active_link.colors.text", ses); + active_link.bg = get_opt_color("document.browse.links.active_link.colors.background", ses); + active_link.color = get_opt_bool("document.browse.links.active_link.enable_color", ses); + active_link.invert = get_opt_bool("document.browse.links.active_link.invert", ses); + active_link.underline = get_opt_bool("document.browse.links.active_link.underline", ses); + active_link.bold = get_opt_bool("document.browse.links.active_link.bold", ses); foreach (document, format_cache) { copy_struct(&document->options.active_link, &active_link); diff --git a/src/document/document.h b/src/document/document.h index 3097a69b3..cc8cde915 100644 --- a/src/document/document.h +++ b/src/document/document.h @@ -223,7 +223,7 @@ void done_link_members(struct link *link); * validity of formatted documents in the cache. */ unsigned long get_document_css_magic(struct document *document); -void update_cached_document_options(void); +void update_cached_document_options(struct session *ses); struct document *get_cached_document(struct cache_entry *cached, struct document_options *options);