ameyp / CscopeSublime

A Cscope plugin for Sublime Text 2 and 3
89 stars 37 forks source link

Fix for issue #3 #5

Closed vanrijn closed 11 years ago

vanrijn commented 11 years ago

This fixes https://github.com/ameyp/CscopeSublime/issues/3 by changing the directory name from "CscopeSublime" to the directory name that package_control_channel/repositories.json uses: simply "Cscope".

ameyp commented 11 years ago

Thanks for finding this, I do have one suggestion though. Instead of just checking for one or the other, let's just search for both.

    if view.settings().get('syntax') == "Packages/CscopeSublime/Lookup Results.hidden-tmLanguage" \
    or view.settings().get('syntax') == "Packages/Cscope/Lookup Results.hidden-tmLanguage":

This way, users who install the plugin from PackageControl as well as the ones who do a git checkout will both be happy. I'll also add a note mentioning this in the README.

Could you please make this change and add that commit to this pull request too?

vanrijn commented 11 years ago

Hi Amey! I can definitely do that, yeah, but there's two places that the path is used. What should the code be for the set_syntax call? Is there a way to determine which is the right path and use it in both places? Is there a way to know what the current directory of the plugin is?

vanrijn commented 11 years ago

Actually, never mind. I think I got it. =:) How does this look? Oh, blef, sorry, I accidentally cleaned up trailing whitespace on the blank lines in cscope.py while I was at it.

ameyp commented 11 years ago

That's perfect! I tried to figure out the plugin path but failed, this is exactly what I wanted it to be like, thanks :)

Pulled in changes with https://github.com/ameyp/CscopeSublime/commit/03dfec586d53d0f57b2ac48cc786cb2a98126586 and https://github.com/ameyp/CscopeSublime/commit/1bcaa72c3a380f8ae86234c56732a6a7077d578b.

vanrijn commented 11 years ago

Awesome, thank you! And thank you VERY much for this plugin! Without it I don't think I'd be using Sublime Text. =:)