I’ve found how to bind my own command to ctrl+click, but now I’m struggling with obtaining current position of the cursor. Doing view.sel()[0] is obviously unreliable, so I’m looking for a better way.
A great solution would be to get mouse coordinates of the click, convert them to text coordinates via view.layout_to_text and do my stuff. After enabling sublime.log_commands I’ve noticed that Sublime passes mouse coordinates to drag_select handlers (e.g. “command: drag_select {“event”: {“button”: 1, “x”: 582.5, “y”: 274.5}}”). However, I’ve been unable to get hold of them - neither bound by press_command, nor by command in sublime-mousemap entry, my command doesn’t receive the “event” argument.
Any ideas?