widgets(terminal): handle erase in display

This commit is contained in:
Tim Culverhouse 2024-06-10 07:50:59 -05:00
parent c14a100eed
commit 24ad3bf3da

View file

@ -320,13 +320,28 @@ fn run(self: *Terminal) !void {
self.back_screen.cursor.col = col -| 1; self.back_screen.cursor.col = col -| 1;
self.back_screen.cursor.row = row -| 1; self.back_screen.cursor.row = row -| 1;
}, },
// Cursor Horizontal Tab
'I' => { 'I' => {
var iter = seq.iterator(u16); var iter = seq.iterator(u16);
const n = iter.next() orelse 1; const n = iter.next() orelse 1;
self.horizontalTab(n); 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' => { 'K' => {
// TODO selective erase (private_marker == '?') // TODO: selective erase (private_marker == '?')
var iter = seq.iterator(u8); var iter = seq.iterator(u8);
const ps = iter.next() orelse 0; const ps = iter.next() orelse 0;
switch (ps) { switch (ps) {