diff options
author | June McEnroe <june@causal.agency> | 2019-08-06 13:25:29 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-08-06 13:25:29 -0400 |
commit | 5433cfdc280d4aed276e5950c1720ffa9ee4c37f (patch) | |
tree | 5065a75cbf2606cf6217623d0c79b434c59eb94f | |
parent | Add basic viewer (diff) | |
download | stream-5433cfdc280d4aed276e5950c1720ffa9ee4c37f.tar.gz stream-5433cfdc280d4aed276e5950c1720ffa9ee4c37f.zip |
Fix RI state return
-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 { |