aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/link_hover.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-14 03:02:14 +0300
committerGitHub <noreply@github.com>2026-09-14 03:02:14 +0300
commit21c1f8cf856affb875b5ab4302225a63f4563bdd (patch)
treefc3fa607c4af3d9233f3ba7d905a4744ad25c215 /src/client/shell/link_hover.rs
parentadd3dd28f91db1a2b33e9582c60ac9c1809c1bf5 (diff)
fix: hide only kitty image placements overlapping overlays (#4081)
Diffstat (limited to 'src/client/shell/link_hover.rs')
-rw-r--r--src/client/shell/link_hover.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/client/shell/link_hover.rs b/src/client/shell/link_hover.rs
index f35bfbc2..1a89d706 100644
--- a/src/client/shell/link_hover.rs
+++ b/src/client/shell/link_hover.rs
@@ -317,7 +317,11 @@ impl ClientShellState {
})
}
- pub(super) fn render_link_hover(&self, frame: &mut FrameData) {
+ pub(super) fn render_link_hover(
+ &self,
+ frame: &mut FrameData,
+ occlusion: &mut crate::kitty_graphics::surface::Occlusion,
+ ) {
let Some(hover) = self
.link_hover
.as_ref()
@@ -331,6 +335,18 @@ impl ClientShellState {
if row >= frame.height {
continue;
}
+ occlusion.cover(
+ Rect::new(
+ rect.x.saturating_add(region.start_col),
+ row,
+ region
+ .end_col
+ .saturating_sub(region.start_col)
+ .saturating_add(1),
+ 1,
+ )
+ .intersection(Rect::new(0, 0, frame.width, frame.height)),
+ );
for col in region.start_col..=region.end_col {
let col = rect.x.saturating_add(col);
if col >= frame.width {