diff --git a/src/viewer/text/draw.c b/src/viewer/text/draw.c index 65a16e70..5acd4cb8 100644 --- a/src/viewer/text/draw.c +++ b/src/viewer/text/draw.c @@ -324,12 +324,22 @@ draw_doc(struct session *ses, struct document_view *doc_view, int active) vs = doc_view->vs; if (!vs) { - draw_box(term, box, ' ', 0, &color); + int bgchar = get_opt_int("ui.background_char", ses); +#ifdef CONFIG_UTF8 + draw_box(term, box, bgchar, 0, get_bfu_color(term, "desktop")); +#else + draw_box(term, box, (unsigned char)bgchar, 0, get_bfu_color(term, "desktop")); +#endif return; } if (document_has_frames(doc_view->document)) { - draw_box(term, box, ' ', 0, &color); + int bgchar = get_opt_int("ui.background_char", ses); +#ifdef CONFIG_UTF8 + draw_box(term, box, bgchar, 0, get_bfu_color(term, "desktop")); +#else + draw_box(term, box, (unsigned char)bgchar, 0, get_bfu_color(term, "desktop")); +#endif draw_frame_lines(term, doc_view->document->frame_desc, box->x, box->y, &color); if (vs->current_link == -1) vs->current_link = 0; @@ -380,7 +390,13 @@ draw_doc(struct session *ses, struct document_view *doc_view, int active) } doc_view->last_x = vx; doc_view->last_y = vy; - draw_box(term, box, ' ', 0, &color); + + int bgchar = get_opt_int("ui.background_char", ses); +#ifdef CONFIG_UTF8 + draw_box(term, box, bgchar, 0, get_bfu_color(term, "desktop")); +#else + draw_box(term, box, (unsigned char)bgchar, 0, get_bfu_color(term, "desktop")); +#endif if (!doc_view->document->height) return; while (vs->y >= doc_view->document->height) vs->y -= box->height; @@ -481,11 +497,16 @@ draw_formatted(struct session *ses, int rerender) if (!ses->doc_view || !ses->doc_view->document) { /*INTERNAL("document not formatted");*/ struct el_box box; + int bgchar = get_opt_int("ui.background_char", ses); set_box(&box, 0, 1, ses->tab->term->width, ses->tab->term->height - 2); - draw_box(ses->tab->term, &box, ' ', 0, NULL); +#ifdef CONFIG_UTF8 + draw_box(ses->tab->term, &box, bgchar, 0, get_bfu_color(ses->tab->term, "desktop")); +#else + draw_box(ses->tab->term, &box, (unsigned char)bgchar, 0, get_bfu_color(ses->tab->term, "desktop")); +#endif return; }