mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
set top and bottom margins full hookup
This commit is contained in:
@ -565,6 +565,10 @@ pub fn reverseIndex(self: *Window) !void {
|
||||
try self.terminal.reverseIndex(self.alloc);
|
||||
}
|
||||
|
||||
pub fn setTopAndBottomMargin(self: *Window, top: u16, bot: u16) !void {
|
||||
self.terminal.setScrollingRegion(top, bot);
|
||||
}
|
||||
|
||||
pub fn setMode(self: *Window, mode: terminal.Mode, enabled: bool) !void {
|
||||
switch (mode) {
|
||||
.origin => {
|
||||
|
@ -258,6 +258,15 @@ pub fn Stream(comptime Handler: type) type {
|
||||
}
|
||||
} else log.warn("unimplemented CSI callback: {}", .{action}),
|
||||
|
||||
// DECSTBM - Set Top and Bottom Margins
|
||||
// TODO: test
|
||||
'r' => if (@hasDecl(T, "setTopAndBottomMargin")) switch (action.params.len) {
|
||||
0 => try self.handler.setTopAndBottomMargin(1, 0),
|
||||
1 => try self.handler.setTopAndBottomMargin(action.params[0], 0),
|
||||
2 => try self.handler.setTopAndBottomMargin(action.params[0], action.params[1]),
|
||||
else => log.warn("invalid DECSTBM command: {}", .{action}),
|
||||
} else log.warn("unimplemented CSI callback: {}", .{action}),
|
||||
|
||||
else => if (@hasDecl(T, "csiUnimplemented"))
|
||||
try self.handler.csiUnimplemented(action)
|
||||
else
|
||||
|
Reference in New Issue
Block a user