From c8c00ddde39ca8c123423f8f15ecc48f9aa9241a Mon Sep 17 00:00:00 2001 From: Guldoman Date: Fri, 3 Sep 2021 20:00:43 +0200 Subject: [PATCH] Avoid checking for scrollbars overlap twice `[h_]scrollbar_overlaps_point` is already called in `DocView.super.on_mouse_moved`. --- data/core/docview.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/core/docview.lua b/data/core/docview.lua index 2c870b0a..3898f0ad 100644 --- a/data/core/docview.lua +++ b/data/core/docview.lua @@ -283,8 +283,8 @@ end function DocView:on_mouse_moved(x, y, ...) DocView.super.on_mouse_moved(self, x, y, ...) - if self:scrollbar_overlaps_point(x, y) or self.dragging_scrollbar - or self:h_scrollbar_overlaps_point(x, y) or self.dragging_h_scrollbar then + if self.hovered_scrollbar or self.dragging_scrollbar + or self.hovered_h_scrollbar or self.dragging_h_scrollbar then self.cursor = "arrow" else self.cursor = "ibeam"