Prevent hyperlink hover state when mouse is outside viewport

This commit is contained in:
Bryan Lee
2025-01-21 09:50:15 +08:00
parent 5cb2fa6f75
commit bf6cce23da
3 changed files with 5 additions and 2 deletions

View File

@@ -1041,6 +1041,9 @@ fn mouseRefreshLinks(
pos_vp: terminal.point.Coordinate,
over_link: bool,
) !void {
// If the position is outside our viewport, do nothing
if (pos.x < 0 or pos.y < 0) return;
self.mouse.link_point = pos_vp;
if (try self.linkAtPos(pos)) |link| {