summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-31 10:12:49 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-31 10:12:49 +0000
commit5db47ed53a15882e9264a059ec027bc4f5acf5b7 (patch)
treef3f2f49a8292973b6f8eef24058d4156d75771c0
parent95caeaa5dc7f326a53559ea86792e488d88e2c66 (diff)
Pass the ACS border characters through tty_get_acs so they appear correctly on
terminals which don't use the standard set.
-rw-r--r--screen-redraw.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/screen-redraw.c b/screen-redraw.c
index f3c718a9..eee1c83c 100644
--- a/screen-redraw.c
+++ b/screen-redraw.c
@@ -161,7 +161,8 @@ screen_redraw_screen(struct client *c, int status_only)
struct window_pane *wp;
u_int i, j, type;
int status;
- const u_char *border;
+ const u_char *base, *ptr;
+ u_char ch, border[20];
/* Get status line, er, status. */
if (c->message_string != NULL || c->prompt_string != NULL)
@@ -177,11 +178,15 @@ screen_redraw_screen(struct client *c, int status_only)
/* Draw background and borders. */
tty_reset(tty);
+ strlcpy(border, " |-....--||+.", sizeof border);
if (tty_term_has(tty->term, TTYC_ACSC)) {
- border = " xqlkmjwvtun~";
+ base = " xqlkmjwvtun~";
+ for (ptr = base; *ptr != '\0'; ptr++) {
+ if ((ch = tty_get_acs(tty, *ptr)) != '\0')
+ border[ptr - base] = ch;
+ }
tty_putcode(tty, TTYC_SMACS);
- } else
- border = " |-....--||+.";
+ }
for (j = 0; j < tty->sy - status; j++) {
if (status_only && j != tty->sy - 1)
continue;