Open jcreedcmu opened 4 years ago
Here's how I can reliably reproduce:
A
B
in a preview editorC
in a preview editorExpected: navigates to location in B
.
Actual: navigates to A
.
Note that if B
is converted to non-preview, then navigation happens as expected.
My thinking is that this is a vscode bug. I can't see any code path that history navigation takes through our code. I would think it's in archive-filesystem-provider.ts
, but no breakpoints are reached when Go Back is invoked.
Based on some prompting by @p0, I did a deeper dive into this issue. There are currently three limitations that we know of regarding vscode FileSystemProviders
.
As a further example, you can see the same limitations when using the sample MemFS file system provider.
To mitigate #1, we could always open archive files in non-preview mode when navigating from a results view. This would mitigate the problem, not fix it since if the editor is ever closed, we lose navigation history for it.
To Reproduce Import a database with a zipped archive. Open some file on disk outside the source archive. Select various source files in the source archive. Do VS Code command palette "Go Back"
Expected behavior The previously viewed file is shown.
Actual behavior The most recently viewed file outside the source archive is shown.
Additional context Users have reported that this bug doesn't consistently reproduce, and sometimes Go Back and Go Forward is broken even for normal files. A workaround is making the source archive file a non-preview editor, for example by double clicking on it in the file explorer.
Note that this is just one manifestation of the bug. For more context see https://github.com/github/vscode-codeql/issues/500#issuecomment-712301680 below.