From 9685a569416d88fa016ac54e6ebd79207b404940 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 22 Mar 2024 19:57:07 -0700 Subject: [PATCH] terminal: clear unprotected row should preserve row attrs --- src/terminal/Screen.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/terminal/Screen.zig b/src/terminal/Screen.zig index e31b28683..51e86d782 100644 --- a/src/terminal/Screen.zig +++ b/src/terminal/Screen.zig @@ -801,13 +801,13 @@ pub fn clearRows( // Clear all cells if (protected) { 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 { 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 }; } } }