dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 163a07d5fb99f2b187e1da0f66084f14d6459626
parent 80ed2d6f739a0c8ac46c5bf933bf896120884ef2
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Fri, 17 Dec 2010 21:01:33 +0100

madtty: recognize set/clear graphmode with ESC(0, ESC(B

Based on a patch from Ross Mohn.

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
madtty.c | 22++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/madtty.c b/madtty.c @@ -730,6 +730,20 @@ static void es_interpret_csi(madtty_t *t) } } +static void interpret_char_set(madtty_t *t) +{ + if (*t->ebuf == '(') { + switch (t->ebuf[1]) { + case '0': + t->graphmode = true; + break; + case 'B': + t->graphmode = false; + break; + } + } +} + static void try_interpret_escape_seq(madtty_t *t) { char lastchar = t->ebuf[t->elen-1]; @@ -753,8 +767,12 @@ static void try_interpret_escape_seq(madtty_t *t) case '(': case ')': - if (t->elen == 2) - goto cancel; + case '#': + if (t->elen == 2) { + interpret_char_set(t); + cancel_escape_sequence(t); + return; + } break; case ']': /* xterm thing */