From a7ea84ae8feb1789d39d15580b128c46aa58d33c Mon Sep 17 00:00:00 2001 From: Guldoman Date: Tue, 26 Apr 2022 22:49:55 +0200 Subject: [PATCH] Clamp scroll position when dragging the scrollbar without animations --- data/core/view.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/data/core/view.lua b/data/core/view.lua index f9157c08..18693afa 100644 --- a/data/core/view.lua +++ b/data/core/view.lua @@ -135,6 +135,7 @@ function View:on_mouse_moved(x, y, dx, dy) local delta = self:get_scrollable_size() / self.size.y * dy self.scroll.to.y = self.scroll.to.y + delta if not config.animate_drag_scroll then + self:clamp_scroll_position() self.scroll.y = self.scroll.to.y end end