Avoid calling `View:scrollbar_overlaps_point` uselessly

`View:on_mouse_moved` already updated `self.hovered_scrollbar`, so use 
that instead.
This commit is contained in:
Guldoman 2022-04-12 02:37:21 +02:00
parent 16fcb2e751
commit 202e42b568
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ end
function DocView:on_mouse_moved(x, y, ...) function DocView:on_mouse_moved(x, y, ...)
DocView.super.on_mouse_moved(self, x, y, ...) DocView.super.on_mouse_moved(self, x, y, ...)
if self:scrollbar_overlaps_point(x, y) or self.dragging_scrollbar then if self.hovered_scrollbar or self.dragging_scrollbar then
self.cursor = "arrow" self.cursor = "arrow"
else else
self.cursor = "ibeam" self.cursor = "ibeam"