Closed blockbomb closed 11 years ago
I know what you're talking about, and I wanted to make it like the find results too. Unfortunately, the Sublime plugin API doesn't have mouse events, so I don't know of any way by which I can make it jump to results on double-click. I'll keep the issue open, if you can find a way of making it work on double-click I'd be happy to change it.
I would appreciate this change in behavior too. IIRC, the Sublime Git plugin has a similar situation. A patch was submitted (https://github.com/kemayo/sublime-text-2-git/pull/224) that used the enter key to navigate. I think this would be an improvement.
Hm. Maybe https://github.com/SublimeText/MouseEventListener might be helpful?
Actually, I think I got this one. I have this working here on both enter key press and double-click. Will send a pull request in a sec.
@vanrijn Dude, you rock. Seriously.
Confirmed working in Windows and OSX, will check on Linux in a bit.
LOL! Thanks Amey! You just made my night! =:)
Haha, cheers :) Is Vanrijn your name?
Heh. No, I've just been using it forever online. http://movingparts.net/2002/02/02/allow-me-to-introduce-myself/ =:)
That was an excellent read. Nice to meet you, Jason :)
Coming back on-topic, confirmed working in Linux, so closing the issue.
Fixed with commit https://github.com/ameyp/CscopeSublime/commit/918d3a73cdfe42d9c826851b01ba4ac75579708f thanks to pull request https://github.com/ameyp/CscopeSublime/pull/11 by @vanrijn .
I would like the search result buffers that are opened to act like the built in "find" search results, where you can click around the file and not jump to that selection until you double click.
I see it working like this let me know what you think. 1) Cscope for your symbol/definition/callers/callees 2) results window comes up 3) you can navigate the results window and not jump anywhere until you either a) hit enter on the line or b) double click the line with your mouse.
right now if you move the cursor it will jump as soon as it hits a line it can decipher as a file name. This is due to the fact that the event it waits on is the selection changed I'm not well versed in the Sublime API but we should change that for a different event or at least add some thing there to not always evaluate until the users wants it to.
I will look into it more but if anyone has any ideas they will be much appreciated.