redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.08k stars 441 forks source link

Can not go back in .class files when preview mode enabled #3825

Open mamilic opened 1 month ago

mamilic commented 1 month ago

With Enable Preview From Code Navigation turned on, navigating through multiple dependecy files will not get me get back in the same order.

Environment
Steps To Reproduce
  1. Clone demo.zip
  2. Enable Enable Preview From Code Navigation in VsCode settings
  3. Open DemoApplication.java
  4. Navigate to SpringApplication by CTRL+Left Click, and then navigate to SpringApplicationBannerPrinter, it will open the claas in the same tab
  5. Try to navigate back, it will get you back to the DemoApplication instead of SpringApplication, it will completly ignore dependency claas

The outcome should be that the navigation should go through all visited places in editor, including .claas files opened in same tab.

rgrunber commented 3 weeks ago

I see the same behaviour. I'm not sure if we have any control over this though. It almost seems like VS Code itself doesn't properly store the navigation history when preview mode is enabled for workbench editors. https://github.com/microsoft/vscode/issues/166194 would seem to imply that's the case.

Definitely a bug, but unless I'm missing something we can do to fix this, I think this should be filed upstream in VS Code. CC'ing @testforstephen in case he might know.