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

SCM: Clicking 'Open File' leaves Preview Tab in background #72032

Closed
ProLoser opened this Issue Apr 10, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@ProLoser
Copy link

commented Apr 10, 2019

Background

  1. Edit an SCM managed file
  2. Go to Source Control panel
  3. Select changed file in SCM panel (opens preview)
  4. Press 'Open File' button in SCM panel (opens file in new tab)

Result

Preview tab is left in the background (VSCode should never be able to have a preview tab in the background, it fundamentally defeats the purpose of the preview tab). A copy of the same file is opened in another tab. This leaves tab clutter.

Expected

I am no longer concerned with the diff, I want to work on the file. The preview tab should disappear and the editor tab (which is active) should replace it.

See screenshot for illustration of the Preview Tab left in the background and adding clutter
image

@joaomoreno

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

VSCode should never be able to have a preview tab in the background, it fundamentally defeats the purpose of the preview tab

This is incorrect. Instead, the constant is: there should always only be one preview tab at any point in time. That preview tab can easily be next to a pinned tab. Just try it in the explorer: double click file A in the explorer, click file B in the explorer, then click A's tab above the editor. Preview tab of B will still be up there.

The current behavior is correct, as it was reviewed by other users:

  • Selecting a row in the SCM list is a preview action, as you're likely to select other rows.
  • Clicking the "Open File" action on a row element is not a preview action, as it's an explicit action execution, so we pin that editor on purpose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.