diff --git a/src/document/document.c b/src/document/document.c index efa8fed0d..5106e7fec 100644 --- a/src/document/document.c +++ b/src/document/document.c @@ -229,8 +229,8 @@ update_cached_document_options(struct session *ses) 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", ses); - active_link.bg = get_opt_color("document.browse.links.active_link.colors.background", ses); + active_link.color.foreground = get_opt_color("document.browse.links.active_link.colors.text", ses); + active_link.color.background = get_opt_color("document.browse.links.active_link.colors.background", ses); active_link.enable_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); diff --git a/src/document/options.c b/src/document/options.c index 3caa0a70f..c97b969a6 100644 --- a/src/document/options.c +++ b/src/document/options.c @@ -46,8 +46,8 @@ init_document_options(struct session *ses, struct document_options *doo) #endif doo->default_color.image_link = get_opt_color("document.colors.image", ses); - doo->active_link.fg = get_opt_color("document.browse.links.active_link.colors.text", ses); - doo->active_link.bg = get_opt_color("document.browse.links.active_link.colors.background", ses); + doo->active_link.color.foreground = get_opt_color("document.browse.links.active_link.colors.text", ses); + doo->active_link.color.background = get_opt_color("document.browse.links.active_link.colors.background", ses); if (get_opt_bool("document.colors.increase_contrast", ses)) doo->color_flags |= COLOR_INCREASE_CONTRAST; diff --git a/src/document/options.h b/src/document/options.h index 4456fd129..6218a660b 100644 --- a/src/document/options.h +++ b/src/document/options.h @@ -14,8 +14,10 @@ struct active_link_options { unsigned int underline:1; unsigned int bold:1; unsigned int invert:1; - color_T fg; - color_T bg; + struct { + color_T foreground; + color_T background; + } color; }; /** This mostly acts as a option cache so rendering will be faster. However it diff --git a/src/viewer/text/link.c b/src/viewer/text/link.c index e65416676..685511819 100644 --- a/src/viewer/text/link.c +++ b/src/viewer/text/link.c @@ -187,8 +187,8 @@ init_link_drawing(struct document_view *doc_view, struct link *link, int invert) template.attr |= SCREEN_ATTR_BOLD; if (doc_opts->active_link.enable_color) { - colors.foreground = doc_opts->active_link.fg; - colors.background = doc_opts->active_link.bg; + colors.foreground = doc_opts->active_link.color.foreground; + colors.background = doc_opts->active_link.color.background; } else { colors.foreground = link->color.foreground; colors.background = link->color.background;