This commit is contained in:
Mitchell Hashimoto
2023-06-25 10:26:29 -07:00
parent 68b951f19d
commit 9110c07763

View File

@ -317,7 +317,15 @@ pub fn Stream(comptime Handler: type) type {
) else log.warn("unimplemented CSI callback: {}", .{action}),
// Cursor Tabulation Control
'W' => switch (action.params.len) {
'W' => {
switch (action.params.len) {
0 => if (action.intermediates.len == 1 and action.intermediates[0] == '?') {
if (@hasDecl(T, "tabClear"))
try self.handler.tabClear(.all)
else
log.warn("unimplemented tab clear callback: {}", .{action});
},
1 => switch (action.params[0]) {
0 => if (@hasDecl(T, "tabSet"))
try self.handler.tabSet()
@ -334,17 +342,15 @@ pub fn Stream(comptime Handler: type) type {
else
log.warn("unimplemented tab clear callback: {}", .{action}),
else => {
log.warn("invalid cursor tabulation control: {}", .{action});
return;
},
else => {},
},
else => {
else => {},
}
log.warn("invalid cursor tabulation control: {}", .{action});
return;
},
},
// Erase Characters (ECH)
'X' => if (@hasDecl(T, "eraseChars")) try self.handler.eraseChars(