surface: don't early return when clearing hyperlinks

When outside the viewport, other actions such as scrolling might be happening, and doing an early return when clearing hyperlinks prevents scrolling upwards.

We do not early return so we can process scrolling when it happens.
This commit is contained in:
moni
2024-12-21 01:25:06 +08:00
parent 5bb05996eb
commit 819b7e066d

View File

@ -3298,9 +3298,10 @@ pub fn cursorPosCallback(
// No mouse point so we don't highlight links // No mouse point so we don't highlight links
self.renderer_state.mouse.point = null; self.renderer_state.mouse.point = null;
self.renderer_state.terminal.screen.dirty.hyperlink_hover = true;
return; // Mark the link's row as dirty, but continue with updating the
// mouse state below so we can scroll when our position is negative.
self.renderer_state.terminal.screen.dirty.hyperlink_hover = true;
} }
// Always show the mouse again if it is hidden // Always show the mouse again if it is hidden