From 24ad3bf3da65e46c836c8fc43afa8d99ef94c2dc Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 10 Jun 2024 07:50:59 -0500 Subject: [PATCH] widgets(terminal): handle erase in display --- src/widgets/terminal/Terminal.zig | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/widgets/terminal/Terminal.zig b/src/widgets/terminal/Terminal.zig index cecfc3e..e01a555 100644 --- a/src/widgets/terminal/Terminal.zig +++ b/src/widgets/terminal/Terminal.zig @@ -320,13 +320,28 @@ fn run(self: *Terminal) !void { self.back_screen.cursor.col = col -| 1; self.back_screen.cursor.row = row -| 1; }, + // Cursor Horizontal Tab 'I' => { var iter = seq.iterator(u16); const n = iter.next() orelse 1; self.horizontalTab(n); }, + // Erase In Display + 'J' => { + // TODO: selective erase (private_marker == '?') + var iter = seq.iterator(u16); + const kind = iter.next() orelse 0; + switch (kind) { + 0 => {}, + 1 => {}, + 2 => {}, + 3 => {}, + else => {}, + } + }, + // Erase in Line 'K' => { - // TODO selective erase (private_marker == '?') + // TODO: selective erase (private_marker == '?') var iter = seq.iterator(u8); const ps = iter.next() orelse 0; switch (ps) {