mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
NEL next line
This commit is contained in:
@ -678,6 +678,11 @@ pub fn index(self: *Window) !void {
|
||||
self.terminal.index();
|
||||
}
|
||||
|
||||
pub fn nextLine(self: *Window) !void {
|
||||
self.terminal.carriageReturn();
|
||||
self.terminal.index();
|
||||
}
|
||||
|
||||
pub fn setTopAndBottomMargin(self: *Window, top: u16, bot: u16) !void {
|
||||
self.terminal.setScrollingRegion(top, bot);
|
||||
}
|
||||
|
@ -492,6 +492,10 @@ pub fn carriageReturn(self: *Terminal) void {
|
||||
const tracy = trace(@src());
|
||||
defer tracy.end();
|
||||
|
||||
// TODO: left/right margin mode
|
||||
// TODO: origin mode
|
||||
// TODO: wrap state
|
||||
|
||||
self.cursor.x = 0;
|
||||
}
|
||||
|
||||
|
@ -384,6 +384,15 @@ pub fn Stream(comptime Handler: type) type {
|
||||
},
|
||||
} else log.warn("unimplemented ESC callback: {}", .{action}),
|
||||
|
||||
// NEL - Next Line
|
||||
'E' => if (@hasDecl(T, "nextLine")) switch (action.intermediates.len) {
|
||||
0 => try self.handler.nextLine(),
|
||||
else => {
|
||||
log.warn("invalid next line command: {}", .{action});
|
||||
return;
|
||||
},
|
||||
} else log.warn("unimplemented ESC callback: {}", .{action}),
|
||||
|
||||
// RI - Reverse Index
|
||||
'M' => if (@hasDecl(T, "reverseIndex")) switch (action.intermediates.len) {
|
||||
0 => try self.handler.reverseIndex(),
|
||||
|
Reference in New Issue
Block a user