renderer: only highlight link directly under mouse on line

Related to #1398
This commit is contained in:
Mitchell Hashimoto
2024-02-01 14:01:42 -08:00
parent 88e7c96eac
commit 07ebd2e6c0

View File

@ -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);