Code Monkey home page Code Monkey logo

Comments (6)

vanrijn avatar vanrijn commented on August 22, 2024

Hey Jamie,

Sublime Text has some... issues... regarding mouse handling for plugins. If you look in the closed issues list for this plugin, you'll see some of the background for my statement. Anyway, can you please try clicking on the line you want to go to (or arrowing to it) and then pressing "Enter" and see if it takes you to the file and line you're trying to navigate to?

Thanks!

from cscopesublime.

jamie-pate avatar jamie-pate commented on August 22, 2024

Enter key works, it looks like double click is supposed to work but it doesn't (at least in linux, ubuntu 12.04 ST2.0.1 build 2217)

from cscopesublime.

vanrijn avatar vanrijn commented on August 22, 2024

Hopefully plugins will be able to support double clicks in ST3. I hope.

from cscopesublime.

ceeeKay avatar ceeeKay commented on August 22, 2024

It took me a while just to figure out I could click a filename and hit the enter key. Seems missing from the README. I thought I needed another plug-in to be able to go to the files.

from cscopesublime.

redhat008 avatar redhat008 commented on August 22, 2024

Hi, guys, I add some code at the end of cscope.py file. And modify the mousemap file in the User dir.
This work for me. Guys could try it.
Here is the code:

class CustomCscopeVisiter(sublime_plugin.TextCommand):
    def run(self, edit):
        if self.view.name().startswith("Cscope results"):
            self.view.run_command("cscope_visiter")
            return

        for sel in self.view.sel():
            if sel.empty():
                sel = self.view.word(sel)
            self.view.sel().clear()
            self.view.sel().add(sel)
            self.view.show(sel)

mousemap:

{"button": "button1", "count": 2, "modifiers": [], "command": "custom_cscope_visiter"},

Link:
cscope.py:
https://github.com/redhat008/sublimepacksync/blob/master/Packages/Cscope/cscope.py

mousemap :
https://github.com/redhat008/sublimepacksync/blob/master/Packages/User/Default%20(Windows).sublime-mousemap

from cscopesublime.

vanrijn avatar vanrijn commented on August 22, 2024

I just checked and ST3 still does not support this. The problem is that there's no context settings for mouse bindings. So one and only one plugin can override the double-click handler like @redhat008 did above, and if more than one plugin does, it's a crap-shoot as to which plugin actually gets the event. There's nothing we can do here. We're doing the best we can by navigating to cscope results via keyboard key.

from cscopesublime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.