SublimeText / CTags

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

Feature request: Jump to definition in other focus group (panel) #317

Open haferburg opened 8 years ago

haferburg commented 8 years ago

While editing I always have two "focus groups" (I call them panels) open, arranged in 2 columns, as produced by Alt+Shift+2. When I look up a symbol in one panel, I'd like the jump location to open in the other panel, even if the symbol is in the same file.

I tried to hack it in myself, but I wasn't able to understand the code. I'd be very happy about some pointers on where in the code CTags actually finds out which file the symbol is in, and where it jumps to that location. There's some dark magic going on in JumpToDefinition.run(). I assume that CTags needs to prepare some window in case there's more than one jump possibility. But I didn't manage to understand how the actual jump location is reached. A few explaining words would be much appreciated.

chuckfossen commented 8 years ago

I have a similar question. I have noticed that JumpToDefinition.run() when opening a new file will not focus the cursor line in the view window. I have to move the cursor for it cursor line to come into view. How does JumpToDefinition.run() open the file and navigate to the correct line?

chuckfossen commented 8 years ago

An FYI, on_load is called when a file is loaded.