From 548410f769655ee8107c35aaa93c90b79b3cb569 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 16 Jan 2026 10:30:30 +0100 Subject: [PATCH] fix: scrollbar hover effect --- src/tui/scrollbar_v.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tui/scrollbar_v.zig b/src/tui/scrollbar_v.zig index c8d33d9..c339424 100644 --- a/src/tui/scrollbar_v.zig +++ b/src/tui/scrollbar_v.zig @@ -65,6 +65,7 @@ pub fn handle_event(self: *Self, _: tp.pid_ref, m: tp.message) tp.result { pub fn receive(self: *Self, _: tp.pid_ref, m: tp.message) error{Exit}!bool { var y: i32 = undefined; var ypx: i32 = undefined; + const old_hover = self.hover; if (try m.match(.{ "B", input.event.press, @intFromEnum(input.mouse.BUTTON1), tp.any, tp.any, tp.extract(&y), tp.any, tp.extract(&ypx) })) { self.active = true; @@ -86,6 +87,8 @@ pub fn receive(self: *Self, _: tp.pid_ref, m: tp.message) error{Exit}!bool { self.active = false; return true; } else if (try m.match(.{ "H", tp.extract(&self.hover) })) { + if (old_hover != self.hover) + tui.need_render(@src()); return true; }