From 452c77f05321cdf73294d164d4ba9c7e06292aa4 Mon Sep 17 00:00:00 2001 From: SwissalpS Date: Fri, 26 Jun 2020 11:37:52 +0200 Subject: added click check --- plugins/draganddropselectedtext.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/draganddropselectedtext.lua b/plugins/draganddropselectedtext.lua index 984f209..d27169d 100644 --- a/plugins/draganddropselectedtext.lua +++ b/plugins/draganddropselectedtext.lua @@ -64,7 +64,8 @@ function DocView:on_mouse_pressed(button, x, y, clicks) -- no need to proceed if not left button or has no selection if ('left' ~= button) - or not self.doc:has_selection() then + or (not self.doc:has_selection()) + or (1 < clicks) then return on_mouse_pressed(self, button, x, y, clicks) end -- convert pixel coordinates to line and column coordinates -- cgit v1.2.3