From c9accc52e2f0e6df54b5d85fc7c24b1887891b83 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 6 Jul 2024 21:36:28 -0700 Subject: [PATCH] core: show URL even for non-OSC8 hyperlnks --- src/Surface.zig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Surface.zig b/src/Surface.zig index 6a2aa7e14..d9dd4de4f 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -2825,7 +2825,14 @@ pub fn cursorPosCallback( try self.rt_surface.setMouseShape(.pointer); switch (link[0]) { - .open => {}, + .open => { + const str = try self.io.terminal.screen.selectionString(self.alloc, .{ + .sel = link[1], + .trim = false, + }); + defer self.alloc.free(str); + self.rt_surface.mouseOverLink(str); + }, ._open_osc8 => link: { // Show the URL in the status bar