summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-07-31 10:12:49 +0000
committernicm <nicm@openbsd.org>2009-07-31 10:12:49 +0000
commit759a8ee21302d237dbd7bad1ac256d867e797d3b (patch)
tree86c9a7e1cd523aa8a5be9fb8229a61f2ee265d6c
parentBy popular demand and peer pressure, check-in work in progress work to support (diff)
downloadwireguard-openbsd-759a8ee21302d237dbd7bad1ac256d867e797d3b.tar.xz
wireguard-openbsd-759a8ee21302d237dbd7bad1ac256d867e797d3b.zip
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--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 bc802e5af03..10a686425f4 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.7 2009/07/24 19:14:38 nicm Exp $ */
+/* $OpenBSD: screen-redraw.c,v 1.8 2009/07/31 10:12:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;