summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--term.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/term.c b/term.c
index 22eb621..bb5d195 100644
--- a/term.c
+++ b/term.c
@@ -116,6 +116,7 @@ static char updateNUL(wchar_t ch) {
 }
 
 enum C1 {
+	RI  = 'M',
 	CSI = '[',
 	OSC = ']',
 	ST  = '\\',
@@ -131,6 +132,15 @@ static char updateESC(wchar_t ch) {
 		case '(': discard = true; return ESC;
 		case '=': return NUL;
 		case '>': return NUL;
+
+		case RI: {
+			move(
+				cell(scroll.top + 1, 0), cell(scroll.top, 0),
+				cols * (scroll.bot - scroll.top)
+			);
+			clear(cell(scroll.top, 0), cell(scroll.top, cols - 1));
+		}
+
 		case CSI: return CSI;
 		case OSC: return OSC;
 		default:  return unhandled("ESC %lc", ch);