From d030155c8144a45124781665e37fa69b62f11b9c Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Wed, 25 Dec 2024 21:15:58 -0500 Subject: [PATCH] fix: unconditionally mark cursor row dirty in `cursorScrollAbove` explained in comment --- src/terminal/Screen.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/terminal/Screen.zig b/src/terminal/Screen.zig index 16dec7230..00e8a8d35 100644 --- a/src/terminal/Screen.zig +++ b/src/terminal/Screen.zig @@ -782,6 +782,12 @@ pub fn cursorDownScroll(self: *Screen) !void { /// This scrolls the active area at and above the cursor. /// The lines below the cursor are not scrolled. pub fn cursorScrollAbove(self: *Screen) !void { + // We unconditionally mark the cursor row as dirty here because + // the cursor always changes page rows inside this function, and + // when that happens it can mean the text in the old row needs to + // be re-shaped because the cursor splits runs to break ligatures. + self.cursor.page_pin.markDirty(); + // If the cursor is on the bottom of the screen, its faster to use // our specialized function for that case. if (self.cursor.y == self.pages.rows - 1) {