Hello all,
I have written numerous plugins that launch their own result views from which you can double to navigate to a file in the project. Each results view has different logic for jumping to the file, so I ended up writing yet another plugin to handle all mouse double clicks. For example, my custom double click plugin looks like this:
class CustomMouseclickCommand(sublime.plugin.TextCommand): def run_(self, view, args): if self.view.name().startswith ("View1): self.view.run_command("my_command1) return if self.view.name().startswith ("View2): self.view.run_command("my_command2") return if self.view.name().startswith ("View3): self.view.run_command("my_command3") return if self.view.name().startswith ("Find Results): self.view.run_command("????") <--------- return else: self.view.run_command('expand_selection', {'to': 'word'})
I also have the following mouse click command:
[ { "button": "button1", "count": 2, "press_command": "custom_mouseclick", "press_args": {"key": "selector", "operand": {"by": "words"}}, } ]
I want to know the command and args that the find-in-files results view calls to jump to the file so that I can insert that command into my code above with the arrow. I tried the default mouse double click command (drag_select, by:words), and that is not working. Any help in this direction is most appreciated.
Thanks,
Rajah