mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
scren resize
This commit is contained in:
@ -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;
|
||||||
|
Reference in New Issue
Block a user