Hi ST users,
I have bound mouse double click to a custom function as below.
> [
> {
> “button”: “button1”, “count”: 2,
> “command”: “custom_mouseclick”,
> },
> ]
My custom_mouseclick.py is as below.
class CustomMouseclickCommand(sublime_plugin.TextCommand):
def run_(self, view, args):
if self.view.name().startswith("name1"):
self.view.run_command('cmd1')
return
if self.view.name().startswith("name2"):
self.view.run_command('cmd2)
return
self.view.run_command('drag_select', {'by' : 'words'})
The custom mouse actions get called when I am in the appropriate views, however, the default action (drag_select) is not working in other views. What am I missing?
Thanks,
Rajah