mod(renderer): initial version of double buffer intermediate renderer
This branch will implement the necessary changes for the widgets and their implementations to use the new renderer correctly.
This commit is contained in:
@@ -20,7 +20,7 @@ pub const ReportMode = enum {
|
||||
pub fn getTerminalSize() Size {
|
||||
var ws: std.posix.winsize = undefined;
|
||||
_ = std.posix.system.ioctl(std.posix.STDIN_FILENO, std.posix.T.IOCGWINSZ, @intFromPtr(&ws));
|
||||
return .{ .cols = ws.col, .rows = ws.row };
|
||||
return .{ .cols = ws.col - 1, .rows = ws.row - 1 };
|
||||
}
|
||||
|
||||
pub fn saveScreen() !void {
|
||||
@@ -126,8 +126,8 @@ pub fn getCursorPosition() !Position {
|
||||
}
|
||||
|
||||
return .{
|
||||
.row = try std.fmt.parseInt(u16, row[0..ridx], 10),
|
||||
.col = try std.fmt.parseInt(u16, col[0..cidx], 10),
|
||||
.row = try std.fmt.parseInt(u16, row[0..ridx], 10) - 1,
|
||||
.col = try std.fmt.parseInt(u16, col[0..cidx], 10) - 1,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user