From b88d343ddd192c25107c85d3734ae3d1b84d29ce Mon Sep 17 00:00:00 2001 From: myk002 Date: Wed, 14 Sep 2022 09:25:43 -0700 Subject: [PATCH] fix off-by-one error on scrollbar click detection --- library/lua/gui/widgets.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index d81fbf6b9..0069a1769 100644 --- a/library/lua/gui/widgets.lua +++ b/library/lua/gui/widgets.lua @@ -712,7 +712,7 @@ function Label:click_scrollbar() return 1 else local pos, height = get_scrollbar_pos_and_height(self) - if y < rect.y1 + pos then + if y <= rect.y1 + pos then return '-halfpage' elseif y > rect.y1 + pos + height then return '+halfpage'