diff options
| author | Bryan Lee <38807139+liby@users.noreply.github.com> | 2025-01-21 09:50:15 +0800 |
|---|---|---|
| committer | Bryan Lee <38807139+liby@users.noreply.github.com> | 2025-01-22 02:49:37 +0800 |
| commit | bf6cce23da165c80622f7b12fefd3193d02c2d96 (patch) | |
| tree | d31ad422b3d5326953da276011a68679001da705 /src/Surface.zig | |
| parent | 5cb2fa6f7594202b12a2603bf32094aa75b1bf0e (diff) | |
Prevent hyperlink hover state when mouse is outside viewport
Diffstat (limited to 'src/Surface.zig')
| -rw-r--r-- | src/Surface.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Surface.zig b/src/Surface.zig index 138aa2ea2..d9a985aa7 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -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| { |
