diff options
| author | Adam Harrison <adamdharrison@gmail.com> | 2021-11-16 19:12:39 -0500 |
|---|---|---|
| committer | Adam Harrison <adamdharrison@gmail.com> | 2021-11-16 19:12:39 -0500 |
| commit | 18959aebefe22e7bcfff80a2affc8ad0fda76328 (patch) | |
| tree | 209ed9c093b43fabeb7fbf6fef8d8dd732789f07 /data/core/rootview.lua | |
| parent | c58029df8b522105328ae622c1b9b1ceb4ac0843 (diff) | |
| download | lite-xl-18959aebefe22e7bcfff80a2affc8ad0fda76328.tar.gz lite-xl-18959aebefe22e7bcfff80a2affc8ad0fda76328.zip | |
Fixed predicate and minor propogation issue.
Diffstat (limited to 'data/core/rootview.lua')
| -rw-r--r-- | data/core/rootview.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/data/core/rootview.lua b/data/core/rootview.lua index 6c3d1d2d..07f8b7bf 100644 --- a/data/core/rootview.lua +++ b/data/core/rootview.lua @@ -1002,17 +1002,18 @@ function RootView:on_mouse_moved(x, y, dx, dy) self.root_node:on_mouse_moved(x, y, dx, dy) - local node = self.root_node:get_child_overlapping_point(x, y) + self.overlapping_node = self.root_node:get_child_overlapping_point(x, y) + local div = self.root_node:get_divider_overlapping_point(x, y) - local tab_index = node and node:get_tab_overlapping_point(x, y) - if node and node:get_scroll_button_index(x, y) then + local tab_index = self.overlapping_node and self.overlapping_node:get_tab_overlapping_point(x, y) + if self.overlapping_node and self.overlapping_node:get_scroll_button_index(x, y) then core.request_cursor("arrow") elseif div then core.request_cursor(div.type == "hsplit" and "sizeh" or "sizev") elseif tab_index then core.request_cursor("arrow") - elseif node then - core.request_cursor(node.active_view.cursor) + elseif self.overlapping_node then + core.request_cursor(self.overlapping_node.active_view.cursor) end end @@ -1020,7 +1021,7 @@ end function RootView:on_mouse_wheel(...) local x, y = self.mouse.x, self.mouse.y local node = self.root_node:get_child_overlapping_point(x, y) - node.active_view:on_mouse_wheel(...) + return node.active_view:on_mouse_wheel(...) end |
