diff --git a/src/document/document.h b/src/document/document.h index 44e61f56..9e60fd41 100644 --- a/src/document/document.h +++ b/src/document/document.h @@ -208,7 +208,10 @@ struct document { int width, height; /**< size of document */ int nlinks; int nsearch; - color_T bgcolor; + + struct { + color_T background; + } color; enum cp_status cp_status; unsigned int links_sorted:1; /**< whether links are already sorted */ diff --git a/src/document/dom/renderer.c b/src/document/dom/renderer.c index 656b3eab..033ca571 100644 --- a/src/document/dom/renderer.c +++ b/src/document/dom/renderer.c @@ -99,7 +99,7 @@ render_dom_document(struct cache_entry *cached, struct document *document, init_dom_renderer(&renderer, document, buffer, convert_table); - document->bgcolor = document->options.default_style.color.background; + document->color.background = document->options.default_style.color.background; #ifdef CONFIG_UTF8 document->options.utf8 = is_cp_utf8(document->options.cp); #endif /* CONFIG_UTF8 */ diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index 3466a82a..acf8305b 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -2278,7 +2278,7 @@ render_html_document(struct cache_entry *cached, struct document *document, >= document->options.width)); #endif - document->bgcolor = par_format.bgcolor; + document->color.background = par_format.bgcolor; done_html_parser(html_context); diff --git a/src/document/plain/renderer.c b/src/document/plain/renderer.c index 9d2af09b..98c0f26e 100644 --- a/src/document/plain/renderer.c +++ b/src/document/plain/renderer.c @@ -637,7 +637,7 @@ render_plain_document(struct cache_entry *cached, struct document *document, renderer.max_width = document->options.wrap ? document->options.box.width : INT_MAX; - document->bgcolor = document->options.default_style.color.background; + document->color.background = document->options.default_style.color.background; document->width = 0; #ifdef CONFIG_UTF8 document->options.utf8 = is_cp_utf8(document->options.cp); diff --git a/src/viewer/text/draw.c b/src/viewer/text/draw.c index e0676ded..19191cd6 100644 --- a/src/viewer/text/draw.c +++ b/src/viewer/text/draw.c @@ -229,7 +229,7 @@ draw_doc(struct session *ses, struct document_view *doc_view, int active) color.foreground = get_opt_color("document.colors.text", ses); color.background = doc_view->document->height - ? doc_view->document->bgcolor + ? doc_view->document->color.background : get_opt_color("document.colors.background", ses); vs = doc_view->vs;