screen: move debug log

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
Tim Culverhouse 2024-01-19 19:45:02 -06:00
parent de91cbe2d0
commit 7c85f72e7f
2 changed files with 1 additions and 1 deletions

View file

@ -24,7 +24,6 @@ pub fn deinit(self: *Screen, alloc: std.mem.Allocator) void {
} }
pub fn resize(self: *Screen, alloc: std.mem.Allocator, w: usize, h: usize) !void { pub fn resize(self: *Screen, alloc: std.mem.Allocator, w: usize, h: usize) !void {
log.debug("resizing screen: width={d} height={d}", .{ w, h });
alloc.free(self.buf); alloc.free(self.buf);
self.buf = try alloc.alloc(Cell, w * h); self.buf = try alloc.alloc(Cell, w * h);
self.width = w; self.width = w;

View file

@ -101,6 +101,7 @@ pub fn Vaxis(comptime T: type) type {
/// required to display the screen (ie width x height). Any previous screen is /// required to display the screen (ie width x height). Any previous screen is
/// freed when resizing /// freed when resizing
pub fn resize(self: *Self, alloc: std.mem.Allocator, winsize: Winsize) !void { pub fn resize(self: *Self, alloc: std.mem.Allocator, winsize: Winsize) !void {
log.debug("resizing screen: width={d} height={d}", .{ winsize.cols, winsize.rows });
try self.screen.resize(alloc, winsize.cols, winsize.rows); try self.screen.resize(alloc, winsize.cols, winsize.rows);
// we only init our current screen. This has the effect of redrawing // we only init our current screen. This has the effect of redrawing
// every cell // every cell