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

Fixed Jump Tracker jumps when jumping from a file that auto closes #3041

Conversation

shawnaxsom
Copy link
Contributor

@shawnaxsom shawnaxsom commented Sep 12, 2018

What this PR does / why we need it:

I implemented the new Jump Tracker that handles <C-o> behavior. @Chillee and I noticed a few issues when trying to jump from or to files that are auto closed.

One use case, if you close all editors, then open temporary editor, then jump to definition to open another editor (auto-closing the previous editor), <C-o> often doesn't work. vscode ends up sending two separate vscode.window.onDidChangeActiveTextEditor events, once for closing one editor, once for opening the new editor, where as we were expecting just one event.

Another similar use case from @Chillee has the same cause:

If you create a new tab that isn't saved, and you just switch back to the original tab
`ctrl-o` gets you stuck switching between the 2 tabs

So you're in file A
you create a new unsaved file B
so now you're in B
you switch back to file A through a mouse click
`ctrl o` then brings you back to file B
and repeated `ctrl o` cycles between file B -> A -> B ....

Which issue(s) this PR fixes

fixes #3039

@Chillee
Copy link
Member

Chillee commented Sep 12, 2018

LGTM!

@Chillee Chillee merged commit b8e42aa into VSCodeVim:master Sep 12, 2018
@shawnaxsom shawnaxsom deleted the feature/jump-tracker-close-file-on-jump-fixes branch September 12, 2018 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Jump Tracker doesn't always handle that isn't left open in a tab
2 participants