diff options
-rw-r--r-- | term.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/term.c b/term.c index bb5d195..48fed10 100644 --- a/term.c +++ b/term.c @@ -118,8 +118,8 @@ static char updateNUL(wchar_t ch) { enum C1 { RI = 'M', CSI = '[', - OSC = ']', ST = '\\', + OSC = ']', }; static char updateESC(wchar_t ch) { @@ -128,12 +128,12 @@ static char updateESC(wchar_t ch) { discard = false; return NUL; } + switch (ch) { - case '(': discard = true; return ESC; - case '=': return NUL; - case '>': return NUL; + break; case CSI: return CSI; + break; case OSC: return OSC; - case RI: { + break; case RI: { move( cell(scroll.top + 1, 0), cell(scroll.top, 0), cols * (scroll.bot - scroll.top) @@ -141,10 +141,13 @@ static char updateESC(wchar_t ch) { clear(cell(scroll.top, 0), cell(scroll.top, cols - 1)); } - case CSI: return CSI; - case OSC: return OSC; - default: return unhandled("ESC %lc", ch); + break; case '(': discard = true; return ESC; + break; case '=': // ignore + break; case '>': // ignore + + break; default: return unhandled("ESC %lc", ch); } + return NUL; } enum SGR { |