Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goto Definition does not reuse tabs in other groups #121

Closed
FichteFoll opened this issue Apr 20, 2015 · 6 comments
Closed

Goto Definition does not reuse tabs in other groups #121

FichteFoll opened this issue Apr 20, 2015 · 6 comments

Comments

@FichteFoll
Copy link
Contributor

From @jimlawton on April 20, 2015 13:10

I use a 2-group setup, generally with library code in the right-hand group. Previously, "Goto Definition" would jump to the implementation in the other group if I already had a tab for the module there, or otherwise open a new tab in the current group.

Now, however, (and for the last month or more), "Goto Definition" always opens the destination in a new tab in the current group.

Steps to reproduce:

  1. Set up a 2-group (pane) session in ST.
  2. Open a file with the function definition in one of the groups (Group 1).
  3. Open a file with code calling the function in the other group (Group 2).
  4. In the latter file, right-click on the function name, and "Goto Definition".

Expected result: the cursor jumps to the function definition in Group 1.
Actual result: the cursor jumps to the function definition in a new tab in Group 2.

Details:

  • Build: 3084
  • Channel: dev
  • OS: Linux (Ubuntu 14.04, x64)

Copied from original issue: sublimehq/sublime_text#813

@FichteFoll
Copy link
Contributor Author

This issue is a bit tricky. I also noticed this, but I thought about whether I would normally want to open the definition in an open view or in its own view. Usually it would be the 'own view'.

However, currently ST does neither because it will focus and scroll existing views iff they are in the same group as the quick panel.

Imo it could be done that shift+enter would always open the definition in a new view while normal enter would focus and scroll the existing view, regardless of group position.
It would look weird with the preview however. That could be either in the same group as the panel, which is direct feedback to the user but has the weird jumping in case you use "enter", or it could be focusing the views in a different group if they exist, which will then jump around during preview.

@jimlawton
Copy link

Which package controls this behaviour?

@FichteFoll
Copy link
Contributor Author

The Default package. Refer to Default/symbol.py.

@nathikazad
Copy link

Would really appreciate this feature. For instance referencing the same file multiple times opens too many tabs.

@SCdF
Copy link

SCdF commented Oct 2, 2015

I know we're not big fans of "me too" style comments, but I would appreciate a feature that disabled the current way this works and reuses open editors already. My standard workflow is 1/3rd terminal, 2/3 ST3 with two panes, prod code in the first and test code in the second. It's frustrating to goto defintion in a test and have it not jump to the already open code editor in the prod code pane.

@FichteFoll
Copy link
Contributor Author

This issue has been moved back to the other repo.

Repository owner locked and limited conversation to collaborators Apr 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants