SublimeText / CTags

CTags support for Sublime Text
MIT License
986 stars 167 forks source link

ST3 Build 3114 incompatible with ctag "Navigate to Definition" functionality #313

Closed lizhouli closed 10 months ago

lizhouli commented 8 years ago

When upgrading to 3114, "Navigate to Definition" functionality in ctag doesn't work again.

It should jump to the function definition normally which works in Build 3103, but now it depends on whether the file the function definition is in is opened,

As a workaround, I have to roll back to Build 3103.

sardaukar commented 8 years ago

I'm on build 3125, and it kinda works for me, but it always scrolls to the last line of the file if the file is not opened when I navigate to the definition :(

mwean commented 8 years ago

I'm having the same problem as @sardaukar. I played around with the timeout in the function that scrolls the definition into view, and 100ms seemed to fix it.

# ctagsplugin.py
def select(view, region):
    sel_set = view.sel()
    sel_set.clear()
    sel_set.add(region)
    sublime.set_timeout(functools.partial(view.show_at_center, region), 100)

It seems weird that we have to wait that long before scrolling and that the newer version would cause problems...

lizhouli commented 8 years ago

Still weird for me on build 3126 - it jumps to the beginning of the file. 3103 looks the stable version for me...

chuckfossen commented 8 years ago

@mwean, that timeout works for me - for now...

lizhouli commented 7 years ago

@mwean it works for me too, thanks

chuckfossen commented 7 years ago

I still have issues with this.

deathaxe commented 10 months ago

Can't reproduce it with ST 3141+.