From 4e313d9fc57a9b838761b3b088f6b087d56cf9cb Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Tue, 5 Oct 2021 20:00:06 -0400 Subject: [PATCH] Propogated mouse clicks correctly. --- data/core/rootview.lua | 2 +- data/plugins/projectsearch.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/core/rootview.lua b/data/core/rootview.lua index 0d219474..d8f78024 100644 --- a/data/core/rootview.lua +++ b/data/core/rootview.lua @@ -877,7 +877,7 @@ function RootView:on_mouse_pressed(button, x, y, clicks) elseif not self.dragged_node then -- avoid sending on_mouse_pressed events when dragging tabs core.set_active_view(node.active_view) if not self.on_view_mouse_pressed(button, x, y, clicks) then - node.active_view:on_mouse_pressed(button, x, y, clicks) + return node.active_view:on_mouse_pressed(button, x, y, clicks) end end end diff --git a/data/plugins/projectsearch.lua b/data/plugins/projectsearch.lua index dda3a2d0..d0d75d7f 100644 --- a/data/plugins/projectsearch.lua +++ b/data/plugins/projectsearch.lua @@ -92,7 +92,7 @@ end function ResultsView:on_mouse_pressed(...) local caught = ResultsView.super.on_mouse_pressed(self, ...) if not caught then - self:open_selected_result() + return self:open_selected_result() end end @@ -108,6 +108,7 @@ function ResultsView:open_selected_result() dv.doc:set_selection(res.line, res.col) dv:scroll_to_line(res.line, false, true) end) + return true end