hook up insertLines

This commit is contained in:
Mitchell Hashimoto
2022-05-13 09:14:32 -07:00
parent b764f502ee
commit 00e49dccc1
2 changed files with 12 additions and 0 deletions

View File

@ -561,6 +561,10 @@ pub fn eraseChars(self: *Window, count: usize) !void {
try self.terminal.eraseChars(self.alloc, count); try self.terminal.eraseChars(self.alloc, count);
} }
pub fn insertLines(self: *Window, count: usize) !void {
try self.terminal.insertLines(self.alloc, count);
}
pub fn deleteLines(self: *Window, count: usize) !void { pub fn deleteLines(self: *Window, count: usize) !void {
self.terminal.deleteLines(self.alloc, count); self.terminal.deleteLines(self.alloc, count);
} }

View File

@ -195,6 +195,14 @@ pub fn Stream(comptime Handler: type) type {
}, },
) else log.warn("unimplemented CSI callback: {}", .{action}), ) else log.warn("unimplemented CSI callback: {}", .{action}),
// IL - Insert Lines
// TODO: test
'L' => if (@hasDecl(T, "insertLines")) switch (action.params.len) {
0 => try self.handler.insertLines(1),
1 => try self.handler.insertLines(action.params[0]),
else => log.warn("invalid IL command: {}", .{action}),
} else log.warn("unimplemented CSI callback: {}", .{action}),
// DL - Delete Lines // DL - Delete Lines
// TODO: test // TODO: test
'M' => if (@hasDecl(T, "deleteLines")) switch (action.params.len) { 'M' => if (@hasDecl(T, "deleteLines")) switch (action.params.len) {