From a6992baa30ce8c323f9b2f363b9445071dc7840f Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Tue, 27 Aug 2024 00:56:46 -0400 Subject: [PATCH] fix(terminal): don't MOVE hyperlinks in clonePartialRowFrom --- src/terminal/page.zig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/terminal/page.zig b/src/terminal/page.zig index 2110b531f..5f44d28a4 100644 --- a/src/terminal/page.zig +++ b/src/terminal/page.zig @@ -745,15 +745,17 @@ pub const Page = struct { if (src_cell.hyperlink) hyperlink: { dst_row.hyperlink = true; - // Fast-path: same page we can move it directly + const id = other.lookupHyperlink(src_cell).?; + + // Fast-path: same page we can add with the same id. if (other == self) { - self.moveHyperlink(src_cell, dst_cell); + self.hyperlink_set.use(self.memory, id); + try self.setHyperlink(dst_row, dst_cell, id); break :hyperlink; } // Slow-path: get the hyperlink from the other page, // add it, and migrate. - const id = other.lookupHyperlink(src_cell).?; const dst_link = dst_link: { // Fast path is we just dupe the hyperlink because