diff options
author | Jipok <braaga@inbox.ru> | 2021-12-12 13:55:24 +0500 |
---|---|---|
committer | Jipok <braaga@inbox.ru> | 2021-12-12 13:55:24 +0500 |
commit | 72d30b00d6012d4ea432a5f680eac37040475279 (patch) | |
tree | 90b4c0fa159567a1646c5f68596eb81f7a416f9b /plugins/ephemeral_tabs.lua | |
parent | c883e1792a084c32ab79965c589e7f8e0e492958 (diff) | |
download | lite-xl-plugins-72d30b00d6012d4ea432a5f680eac37040475279.tar.gz lite-xl-plugins-72d30b00d6012d4ea432a5f680eac37040475279.zip |
Support 2.0.3
Diffstat (limited to 'plugins/ephemeral_tabs.lua')
-rw-r--r-- | plugins/ephemeral_tabs.lua | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/ephemeral_tabs.lua b/plugins/ephemeral_tabs.lua index e1505c3..dea4261 100644 --- a/plugins/ephemeral_tabs.lua +++ b/plugins/ephemeral_tabs.lua @@ -51,17 +51,15 @@ end -- Double clicking on a tab makes it normal local RootView_on_mouse_pressed = RootView.on_mouse_pressed function RootView:on_mouse_pressed(button, x, y, clicks) - if RootView_on_mouse_pressed(self, button, x, y, clicks) then - if clicks > 1 then - local node = self.root_node:get_child_overlapping_point(x, y) - local idx = node:get_tab_overlapping_point(x, y) - if idx then - node.views[idx].ephemeral = false - end + local result = RootView_on_mouse_pressed(self, button, x, y, clicks) + if clicks > 1 then + local node = self.root_node:get_child_overlapping_point(x, y) + local idx = node:get_tab_overlapping_point(x, y) + if idx then + node.views[idx].ephemeral = false end - return true end - return false + return result end -- Dragging a tab makes it normal |