mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00
hook up scroll down and up CSI codes (SD/SU)
This commit is contained in:
@ -1627,6 +1627,14 @@ pub fn enquiry(self: *Window) !void {
|
|||||||
try self.queueWrite("");
|
try self.queueWrite("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn scrollDown(self: *Window, count: usize) !void {
|
||||||
|
self.terminal.scrollDown(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn scrollUp(self: *Window, count: usize) !void {
|
||||||
|
self.terminal.scrollUp(count);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn setActiveStatusDisplay(
|
pub fn setActiveStatusDisplay(
|
||||||
self: *Window,
|
self: *Window,
|
||||||
req: terminal.StatusDisplay,
|
req: terminal.StatusDisplay,
|
||||||
|
@ -275,6 +275,30 @@ pub fn Stream(comptime Handler: type) type {
|
|||||||
},
|
},
|
||||||
) else log.warn("unimplemented CSI callback: {}", .{action}),
|
) else log.warn("unimplemented CSI callback: {}", .{action}),
|
||||||
|
|
||||||
|
// Scroll Up (SD)
|
||||||
|
'S' => if (@hasDecl(T, "scrollUp")) try self.handler.scrollUp(
|
||||||
|
switch (action.params.len) {
|
||||||
|
0 => 1,
|
||||||
|
1 => action.params[0],
|
||||||
|
else => {
|
||||||
|
log.warn("invalid scroll up command: {}", .{action});
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
) else log.warn("unimplemented CSI callback: {}", .{action}),
|
||||||
|
|
||||||
|
// Scroll Down (SD)
|
||||||
|
'T' => if (@hasDecl(T, "scrollDown")) try self.handler.scrollDown(
|
||||||
|
switch (action.params.len) {
|
||||||
|
0 => 1,
|
||||||
|
1 => action.params[0],
|
||||||
|
else => {
|
||||||
|
log.warn("invalid scroll down command: {}", .{action});
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
) else log.warn("unimplemented CSI callback: {}", .{action}),
|
||||||
|
|
||||||
// Erase Characters (ECH)
|
// Erase Characters (ECH)
|
||||||
'X' => if (@hasDecl(T, "eraseChars")) try self.handler.eraseChars(
|
'X' => if (@hasDecl(T, "eraseChars")) try self.handler.eraseChars(
|
||||||
switch (action.params.len) {
|
switch (action.params.len) {
|
||||||
|
Reference in New Issue
Block a user