Merge pull request #1564 from qwerasd205/fix-render-alloc

fix(renderer): allocate enough room for fg cells
This commit is contained in:
Mitchell Hashimoto
2024-03-03 18:45:38 -08:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@ -1552,9 +1552,9 @@ fn rebuildCells(
try self.cells.ensureTotalCapacity(
self.alloc,
// * 3 for background modes and cursor and underlines
// * 3 for glyph + underline + strikethrough for each cell
// + 1 for cursor
(screen.rows * screen.cols * 2) + 1,
(screen.rows * screen.cols * 3) + 1,
);
// Create an arena for all our temporary allocations while rebuilding

View File

@ -973,9 +973,9 @@ pub fn rebuildCells(
try self.cells.ensureTotalCapacity(
self.alloc,
// * 3 for background modes and cursor and underlines
// * 3 for glyph + underline + strikethrough for each cell
// + 1 for cursor
(screen.rows * screen.cols * 2) + 1,
(screen.rows * screen.cols * 3) + 1,
);
// Create an arena for all our temporary allocations while rebuilding