f CSI alias for set cursor pos

This commit is contained in:
Mitchell Hashimoto
2022-06-24 10:20:56 -07:00
parent 52c5af9228
commit f7aca2e493

View File

@ -281,6 +281,16 @@ pub fn Stream(comptime Handler: type) type {
}, },
) else log.warn("unimplemented CSI callback: {}", .{action}), ) else log.warn("unimplemented CSI callback: {}", .{action}),
// Alias for set cursor position (H)
'f' => {
var alias = action;
alias.final = 'H';
// Try would be better here but recursive try on
// inferred error sets are not allowed.
return self.csiDispatch(alias);
},
// SM - Set Mode // SM - Set Mode
'h' => if (@hasDecl(T, "setMode")) { 'h' => if (@hasDecl(T, "setMode")) {
for (action.params) |mode| for (action.params) |mode|