From 05530cf7769a47a49a185d228afaa934d6df7575 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Sun, 10 Nov 2024 17:35:37 +0000 Subject: [PATCH] fix: regression caused by #652 --- src/config/common.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/config/common.rs b/src/config/common.rs index f1bc3c7..d987e85 100644 --- a/src/config/common.rs +++ b/src/config/common.rs @@ -246,6 +246,13 @@ impl CommonConfig { let script = match event.direction() { ScrollDirection::Up => scroll_up_script.as_ref(), ScrollDirection::Down => scroll_down_script.as_ref(), + ScrollDirection::Smooth => { + if event.scroll_deltas().unwrap_or_default().1 > 0.0 { + scroll_down_script.as_ref() + } else { + scroll_up_script.as_ref() + } + } _ => None, };