summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/screen-redraw.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2022-03-16 17:00:18 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2022-03-16 17:00:18 +0000
commite56c9e28c319bd905c079725f1475ae2a7f98fcd (patch)
treeae451f63c899a0b6a69ef4c0c6b4f2f7008274aa /usr.bin/tmux/screen-redraw.c
parentf8c18dd0f846b2dd4e285608bfcceb4e76e20ea4 (diff)
Add an option to set the character used for unused areas of the
terminal, GitHub issue 3110.
Diffstat (limited to 'usr.bin/tmux/screen-redraw.c')
-rw-r--r--usr.bin/tmux/screen-redraw.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/tmux/screen-redraw.c b/usr.bin/tmux/screen-redraw.c
index afe8de9022d..710762b0e06 100644
--- a/usr.bin/tmux/screen-redraw.c
+++ b/usr.bin/tmux/screen-redraw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-redraw.c,v 1.94 2022/02/04 11:57:22 nicm Exp $ */
+/* $OpenBSD: screen-redraw.c,v 1.95 2022/03/16 17:00:17 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -47,11 +47,16 @@ enum screen_redraw_border_type {
/* Get cell border character. */
static void
-screen_redraw_border_set(struct window_pane *wp, enum pane_lines pane_lines,
- int cell_type, struct grid_cell *gc)
+screen_redraw_border_set(struct window *w, struct window_pane *wp,
+ enum pane_lines pane_lines, int cell_type, struct grid_cell *gc)
{
u_int idx;
+ if (cell_type == CELL_OUTSIDE && w->fill_character != NULL) {
+ utf8_copy(&gc->data, &w->fill_character[0]);
+ return;
+ }
+
switch (pane_lines) {
case PANE_LINES_NUMBER:
if (cell_type == CELL_OUTSIDE) {
@@ -409,7 +414,7 @@ screen_redraw_make_pane_status(struct client *c, struct window_pane *wp,
else
py = wp->yoff + wp->sy;
cell_type = screen_redraw_type_of_cell(c, px, py, pane_status);
- screen_redraw_border_set(wp, pane_lines, cell_type, &gc);
+ screen_redraw_border_set(w, wp, pane_lines, cell_type, &gc);
screen_write_cell(&ctx, &gc);
}
gc.attr &= ~GRID_ATTR_CHARSET;
@@ -690,7 +695,7 @@ screen_redraw_draw_borders_cell(struct screen_redraw_ctx *ctx, u_int i, u_int j)
screen_redraw_check_is(x, y, pane_status, marked_pane.wp))
gc.attr ^= GRID_ATTR_REVERSE;
}
- screen_redraw_border_set(wp, ctx->pane_lines, cell_type, &gc);
+ screen_redraw_border_set(w, wp, ctx->pane_lines, cell_type, &gc);
if (cell_type == CELL_TOPBOTTOM &&
(c->flags & CLIENT_UTF8) &&