mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-18 01:20:17 +02:00
Don't nuke charset flag on [0m. Also rename DRAWING -> CHARSET flag.
This commit is contained in:
8
tty.c
8
tty.c
@@ -1,4 +1,4 @@
|
||||
/* $Id: tty.c,v 1.5 2007-11-27 21:07:38 nicm Exp $ */
|
||||
/* $Id: tty.c,v 1.6 2007-11-27 23:01:27 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@@ -201,7 +201,7 @@ tty_puts(struct tty *tty, const char *s)
|
||||
void
|
||||
tty_putc(struct tty *tty, char ch)
|
||||
{
|
||||
if (tty->attr & ATTR_DRAWING)
|
||||
if (tty->attr & ATTR_CHARSET)
|
||||
ch = tty_get_acs(tty, ch);
|
||||
buffer_write8(tty->out, ch);
|
||||
}
|
||||
@@ -346,7 +346,7 @@ tty_attributes(struct tty *tty, u_char attr, u_char colr)
|
||||
|
||||
/* If any bits are being cleared, reset everything. */
|
||||
if (tty->attr & ~attr) {
|
||||
if ((tty->attr & ATTR_DRAWING) &&
|
||||
if ((tty->attr & ATTR_CHARSET) &&
|
||||
exit_alt_charset_mode != NULL)
|
||||
tty_puts(tty, exit_alt_charset_mode);
|
||||
tty_puts(tty, exit_attribute_mode);
|
||||
@@ -372,7 +372,7 @@ tty_attributes(struct tty *tty, u_char attr, u_char colr)
|
||||
tty_puts(tty, enter_reverse_mode);
|
||||
if ((attr & ATTR_HIDDEN) && enter_secure_mode != NULL)
|
||||
tty_puts(tty, enter_secure_mode);
|
||||
if ((attr & ATTR_DRAWING) && enter_alt_charset_mode != NULL)
|
||||
if ((attr & ATTR_CHARSET) && enter_alt_charset_mode != NULL)
|
||||
tty_puts(tty, enter_alt_charset_mode);
|
||||
|
||||
fg = (colr >> 4) & 0xf;
|
||||
|
Reference in New Issue
Block a user