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

When closing a window with :q VS Code now selects the tab "before" the one you were previously on #2984

Closed
insidewhy opened this issue Aug 23, 2018 · 3 comments · Fixed by #3170

Comments

@insidewhy
Copy link
Contributor

  1. Load 3 files, each in its own tab.
  2. Move to the second tab, then the third tab.
  3. Type :q<enter> to close the tab.

I would now expect the second tab to be selected, and this worked up until recently. Now the first tab will be selected instead. It always chooses the tab "one to the left of" the tab it should be selecting.

@MirKml
Copy link

MirKml commented Oct 1, 2018

My common use case from big Visual Studio vsvim extension, PHPStorm etc:
I'm inside tab with file1.
go to definition -> 'gd' -> opens new tab with line with definition
:q for close tab with definition
original opened tab - with file1 is opened.

This doesn't work in vscodevim, after :q for window with definition, other (maybe previously selected) tab is opened. Very annoying.

Maybe is related to previously closed bug #917.

@insidewhy
Copy link
Contributor Author

Weirdly it does select the correct tab immediately after closing, but within a few millisecond it switches to the tab to the left. Living with this for a few months is starting to get really annoying haha. I really miss vim, it couldn't do what VS Code can but I only hit two bugs in a decade. With VS Code you discover new bugs every day.

@insidewhy
Copy link
Contributor Author

Deleting this line of code fixes the bug:

https://github.com/VSCodeVim/Vim/blob/master/src/cmd_line/commands/quit.ts#L48

Not sure what it's supposed to be doing, but it surely can't be worth the consequences it's causing.

insidewhy added a commit to insidewhy/Vim that referenced this issue Oct 27, 2018
insidewhy added a commit to insidewhy/Vim that referenced this issue Oct 27, 2018
insidewhy added a commit to insidewhy/Vim that referenced this issue Dec 7, 2018
jpoon added a commit that referenced this issue Dec 10, 2018
Fix #2984: wrong tab selected after :quit
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 a pull request may close this issue.

2 participants