mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
fix potential crash
This commit is contained in:
@ -416,7 +416,7 @@ pub fn rebuildCells(self: *Grid, term: *Terminal) !void {
|
|||||||
// Get our new length and cache the cells.
|
// Get our new length and cache the cells.
|
||||||
try row_cells.ensureTotalCapacity(self.alloc, term.screen.cols);
|
try row_cells.ensureTotalCapacity(self.alloc, term.screen.cols);
|
||||||
row_cells.clearRetainingCapacity();
|
row_cells.clearRetainingCapacity();
|
||||||
row_cells.appendSliceAssumeCapacity(self.cells.items[start..]);
|
try row_cells.appendSlice(self.alloc, self.cells.items[start..]);
|
||||||
|
|
||||||
// Set row is not dirty anymore
|
// Set row is not dirty anymore
|
||||||
row.setDirty(false);
|
row.setDirty(false);
|
||||||
|
Reference in New Issue
Block a user