From 5433cfdc280d4aed276e5950c1720ffa9ee4c37f Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Tue, 6 Aug 2019 13:25:29 -0400 Subject: Fix RI state return --- term.c | 19 +++++++++++-------- 1 file 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 { -- cgit 1.4.1