diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-07-31 20:35:21 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-07-31 20:35:21 +0000 |
commit | a834d037bc88df59d5513df49d4a5aa964201c69 (patch) | |
tree | 181cdfdba4c43f4583a2feafe2fd0a863277f75f /screen-redraw.c | |
parent | cccd072ed17a34c928411c231f6863a7aa769ce4 (diff) |
Sync OpenBSD patchset 209:
Pass the ACS border characters through tty_get_acs so they appear correctly on
terminals which don't use the standard set.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index eddf5c7f..69f6f2b5 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -1,4 +1,4 @@ -/* $Id: screen-redraw.c,v 1.43 2009-07-25 09:03:33 tcunha Exp $ */ +/* $Id: screen-redraw.c,v 1.44 2009-07-31 20:35:21 tcunha 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; |