CTags icon indicating copy to clipboard operation
CTags copied to clipboard

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

Open lizhouli opened this issue 9 years ago • 6 comments

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,

  • when the file is already opened, it will jump to the function definition.
  • when the file is not opened, it will open the file and jump to the beginning of the file.

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

lizhouli avatar Jul 22 '16 03:07 lizhouli

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 :(

sardaukar avatar Oct 21 '16 13:10 sardaukar

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...

mwean avatar Nov 01 '16 04:11 mwean

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

lizhouli avatar Nov 07 '16 02:11 lizhouli

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

chuckfossen avatar Nov 21 '16 15:11 chuckfossen

@mwean it works for me too, thanks

lizhouli avatar Oct 10 '17 02:10 lizhouli

I still have issues with this.

chuckfossen avatar Oct 10 '17 13:10 chuckfossen