mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-23 08:33:17 +01:00
Pass the ACS border characters through tty_get_acs so they appear correctly on
terminals which don't use the standard set.
This commit is contained in:
parent
95caeaa5dc
commit
5db47ed53a
@ -161,7 +161,8 @@ screen_redraw_screen(struct client *c, int status_only)
|
|||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
u_int i, j, type;
|
u_int i, j, type;
|
||||||
int status;
|
int status;
|
||||||
const u_char *border;
|
const u_char *base, *ptr;
|
||||||
|
u_char ch, border[20];
|
||||||
|
|
||||||
/* Get status line, er, status. */
|
/* Get status line, er, status. */
|
||||||
if (c->message_string != NULL || c->prompt_string != NULL)
|
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. */
|
/* Draw background and borders. */
|
||||||
tty_reset(tty);
|
tty_reset(tty);
|
||||||
|
strlcpy(border, " |-....--||+.", sizeof border);
|
||||||
if (tty_term_has(tty->term, TTYC_ACSC)) {
|
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);
|
tty_putcode(tty, TTYC_SMACS);
|
||||||
} else
|
}
|
||||||
border = " |-....--||+.";
|
|
||||||
for (j = 0; j < tty->sy - status; j++) {
|
for (j = 0; j < tty->sy - status; j++) {
|
||||||
if (status_only && j != tty->sy - 1)
|
if (status_only && j != tty->sy - 1)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user