mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
hook up delete lines
This commit is contained in:
@ -561,6 +561,10 @@ pub fn eraseChars(self: *Window, count: usize) !void {
|
|||||||
try self.terminal.eraseChars(count);
|
try self.terminal.eraseChars(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn deleteLines(self: *Window, count: usize) !void {
|
||||||
|
self.terminal.deleteLines(self.alloc, count);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn reverseIndex(self: *Window) !void {
|
pub fn reverseIndex(self: *Window) !void {
|
||||||
try self.terminal.reverseIndex(self.alloc);
|
try self.terminal.reverseIndex(self.alloc);
|
||||||
}
|
}
|
||||||
|
@ -194,6 +194,14 @@ pub fn Stream(comptime Handler: type) type {
|
|||||||
},
|
},
|
||||||
) else log.warn("unimplemented CSI callback: {}", .{action}),
|
) else log.warn("unimplemented CSI callback: {}", .{action}),
|
||||||
|
|
||||||
|
// DL - Delete Lines
|
||||||
|
// TODO: test
|
||||||
|
'M' => if (@hasDecl(T, "deleteLines")) switch (action.params.len) {
|
||||||
|
0 => try self.handler.deleteLines(1),
|
||||||
|
1 => try self.handler.deleteLines(action.params[0]),
|
||||||
|
else => log.warn("invalid DL command: {}", .{action}),
|
||||||
|
} else log.warn("unimplemented CSI callback: {}", .{action}),
|
||||||
|
|
||||||
// Delete Character (DCH)
|
// Delete Character (DCH)
|
||||||
'P' => if (@hasDecl(T, "deleteChars")) try self.handler.deleteChars(
|
'P' => if (@hasDecl(T, "deleteChars")) try self.handler.deleteChars(
|
||||||
switch (action.params.len) {
|
switch (action.params.len) {
|
||||||
|
Reference in New Issue
Block a user