terminal: clear unprotected row should preserve row attrs

This commit is contained in:
Mitchell Hashimoto
2024-03-22 19:57:07 -07:00
parent 06a8e4ae72
commit 9685a56941

View File

@ -801,13 +801,13 @@ pub fn clearRows(
// Clear all cells // Clear all cells
if (protected) { if (protected) {
self.clearUnprotectedCells(&chunk.page.data, row, cells); self.clearUnprotectedCells(&chunk.page.data, row, cells);
// We need to preserve other row attributes since we only
// cleared unprotected cells.
row.cells = cells_offset;
} else { } else {
self.clearCells(&chunk.page.data, row, cells); self.clearCells(&chunk.page.data, row, cells);
row.* = .{ .cells = cells_offset };
} }
// Reset our row to point to the proper memory but everything
// else is zeroed.
row.* = .{ .cells = cells_offset };
} }
} }
} }