terminal: clearcells only decs cursor ref if same page

This commit is contained in:
Mitchell Hashimoto
2024-03-21 21:30:52 -07:00
parent 40cac97c86
commit 65696c9900

View File

@ -821,7 +821,9 @@ pub fn clearCells(
// Fast-path, the style ID matches, in this case we just update // Fast-path, the style ID matches, in this case we just update
// our own ref and continue. We never delete because our style // our own ref and continue. We never delete because our style
// is still active. // is still active.
if (cell.style_id == self.cursor.style_id) { if (page == &self.cursor.page_pin.page.data and
cell.style_id == self.cursor.style_id)
{
self.cursor.style_ref.?.* -= 1; self.cursor.style_ref.?.* -= 1;
continue; continue;
} }