From 7c85f72e7f73e871479b37fbc885feb485f6a21e Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 19 Jan 2024 19:45:02 -0600 Subject: [PATCH] screen: move debug log Signed-off-by: Tim Culverhouse --- src/Screen.zig | 1 - src/vaxis.zig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Screen.zig b/src/Screen.zig index 6241814..61666e0 100644 --- a/src/Screen.zig +++ b/src/Screen.zig @@ -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 { - log.debug("resizing screen: width={d} height={d}", .{ w, h }); alloc.free(self.buf); self.buf = try alloc.alloc(Cell, w * h); self.width = w; diff --git a/src/vaxis.zig b/src/vaxis.zig index 2cee5e6..723b0b0 100644 --- a/src/vaxis.zig +++ b/src/vaxis.zig @@ -101,6 +101,7 @@ pub fn Vaxis(comptime T: type) type { /// required to display the screen (ie width x height). Any previous screen is /// freed when resizing 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); // we only init our current screen. This has the effect of redrawing // every cell