From 07ebd2e6c0c68bf7a3ee9765a4b0202936e25e98 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 1 Feb 2024 14:01:42 -0800 Subject: [PATCH] renderer: only highlight link directly under mouse on line Related to #1398 --- src/renderer/link.zig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/renderer/link.zig b/src/renderer/link.zig index ee1532463..ca1dc062a 100644 --- a/src/renderer/link.zig +++ b/src/renderer/link.zig @@ -117,10 +117,11 @@ pub const Set = struct { // If this is a highlight link then we only want to // include matches that include our hover point. - if (link.highlight == .hover and - !sel.contains(mouse_pt)) - { - continue; + switch (link.highlight) { + .always, .always_mods => {}, + .hover, + .hover_mods, + => if (!sel.contains(mouse_pt)) continue, } try matches.append(sel);