-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Clicking through function takes you to top of file first #8955
Comments
The unit-test for it seems to pass (we include the theia/packages/editor/src/browser/navigation/navigation-location-service.spec.ts Lines 110 to 131 in 31d4749
|
It looks like the test is right, but the way editor add new navigation locations to the stacks is to blame. It seems that no matter how you open an editor - I've tried code navigation and the search-in-workspace widget - the top of the file is added to the navigation stack. |
This code seems to solve the problem, but it isn't very clean. The data flow is currently a bit muddled, and I haven't found one place to intervene that prevents the initial position from being registered with the service that tracks the location stack - the events handling new editors are lumped in with events handling changes of editor. |
Bug Description:
Ctrl + clicking on a function takes you to the top of the file and then to the location of the function definition, instead of taking you directly to the location of the function definition. This causes problems when using the Go > Back functionality since it takes you to the top of the file, not your previous location. You have to do Go > Back one more time before you go to your actual previous location.
Note that jumping to a function definition within a file works as expected. This seems to only occur when jumping to a different file.
Steps to Reproduce:
Additional Information
The text was updated successfully, but these errors were encountered: