CTags
CTags copied to clipboard
On MacOS Navigate to definition does not jump to line
Sublime text 3, build 3059, Ctags plugin v0.3.7
When using "Navigate to definition" the file containing the identifier definiton would open, but the caret/text cursor would not jump to the text line containing the identifier.
Using the same ctags .tags generated file under Vim does the correct action.
Is this a bug on Ctags plug in ?
I've just noticed that this issue seems to happen only when various choices are given to select from. When there is only one identifier to jump to it looks like the newly opened tab would scroll and select the line where the identifier is found.
This is my console trace when the error shows up.
Traceback (most recent call last): File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 207, in on_load callback.on_load(v) File "ctagsplugin in /Users/nlopezcasad/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 196, in on_load File "ctagsplugin in /Users/nlopezcasad/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 177, in wrapped File "ctagsplugin in /Users/nlopezcasad/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 362, in and_then File "ctagsplugin in /Users/nlopezcasad/Library/Application Support/Sublime Text 3/Installed Packages/CTags.sublime-package", line 349, in follow_tag_path File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime.py", line 859, in add_regions raise ValueError("icon must be a string") ValueError: icon must be a string
I am also experiencing this when I choose the item from the list, but not when there is only one option.
Exactly. Are you experiencing this issue with Sublime 2 & 3? Is this a bug on sublime or in ctags plugin ?
I've seen this and it's quite annoying. However, I haven't had a chance to root cause it yet. Would appreciate some investigation into it.
Same issue in windows 7.
Trace: Traceback (most recent call last): File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 207, in on_load callback.on_load(v) File "ctagsplugin in C:...\Sublime Text 3\Installed Packages\CTags.sublime-package", line 196, in on_load File "ctagsplugin in C:...\Sublime Text 3\Installed Packages\CTags.sublime-package", line 177, in wrapped File "ctagsplugin in C:...\Sublime Text 3\Installed Packages\CTags.sublime-package", line 362, in and_then File "ctagsplugin in C:...\Sublime Text 3\Installed Packages\CTags.sublime-package", line 349, in follow_tag_path File "C:\Program Files\Sublime Text 3\sublime.py", line 859, in add_regions raise ValueError("icon must be a string") ValueError: icon must be a string
I'm thinking this is a ST3 issue - I'd say the add_region
API has changed between ST2 and ST3. The code in question is debug code and could be removed, though this isn't ideal. I'll try to find a better way, but feel free to submit a pull request if anyone spots a solution sooner.
Actually - this could be pretty easy. Try this.
PS: This is guess work based on the add_regions
documentation for ST2 and ST3. I've no idea if it'll work :smile:
I believe that the latest build has fixed this bug. I just did an update of all packages and the bug has disappeared as far as I can tell.
Not for me. Using the (currently) latest version 0.3.8 I'm still having this issue with exactly the same error message in the console. Also using ST3 build 3059 and it worked for me in ST2
Strange. Most of it works for me with the exception of jumping to a macro definition. Jumps to functions and data structures with no issue. When I try to look up macros, the corresponding file gets opened but the required jump doesn't happen.
I have ST build 3062 and Ctags 0.3.8 (guessing here, don't know how to check version but I keep my plugins updated and this is the latest version on package manager so..)
So for me jumping to a function definition doesn't work either.
BTW: You can check the version by running the command "Package Control: List Packages", then search for ctags, but yes, it's the latest version.
However you have a different ST3 version, i.e. you're using the dev build.
Now I tried it with the dev build as well and it looks like they fixed it: The only possibly responsible changes I can see are
- Fixed a crash in plugin_host
- API: Updated to Python 3.3.3
So with ST3 build 3062 it works, at least jump to definition!
Oops, sorry I have to comment again. Maybe it was by accident or for whatever reason the cursor had been set on the definition once. Closing the file and trying again reveals that it still doesn't work for me, even with build 3062, so Jump to definition stops at the file, not jumping to definition, giving the above mentioned error in the console. :-(
Do you have some special settings for ctags?