scren resize

This commit is contained in:
Mitchell Hashimoto
2022-05-22 14:47:54 -07:00
parent c5cdc68466
commit 90f3e36e13

View File

@ -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. // If we're making the screen smaller, dealloc the unused items.
// TODO: we probably want to wrap in the future. try self.screen.resize(alloc, rows, cols);
// 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);
// }
// }
// Set our size // Set our size
self.cols = cols; self.cols = cols;