From 90f3e36e13d4c3536dd61113ac7e1f168d0d072e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 22 May 2022 14:47:54 -0700 Subject: [PATCH] scren resize --- src/terminal/Terminal.zig | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/terminal/Terminal.zig b/src/terminal/Terminal.zig index 6b50fd001..99297d136 100644 --- a/src/terminal/Terminal.zig +++ b/src/terminal/Terminal.zig @@ -90,19 +90,7 @@ pub fn resize(self: *Terminal, alloc: Allocator, cols: usize, rows: usize) !void } // If we're making the screen smaller, dealloc the unused items. - // TODO: we probably want to wrap in the future. - // TODO: new screen - // if (rows < self.rows and self.screen.items.len > rows) { - // for (self.screen.items[rows..self.screen.items.len]) |*line| - // line.deinit(alloc); - // self.screen.shrinkRetainingCapacity(rows); - // } - // if (cols < self.cols) { - // for (self.screen.items) |*line| { - // if (line.items.len < cols) continue; - // line.shrinkRetainingCapacity(cols); - // } - // } + try self.screen.resize(alloc, rows, cols); // Set our size self.cols = cols;