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

Switch to Unsaved Tab When Prompting to Save #17552

Closed
jonatino opened this issue Dec 19, 2016 · 8 comments
Closed

Switch to Unsaved Tab When Prompting to Save #17552

jonatino opened this issue Dec 19, 2016 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster verification-needed Verification of issue is requested verified Verification succeeded workbench-tabs VS Code editor tab issues
Milestone

Comments

@jonatino
Copy link

jonatino commented Dec 19, 2016

  • VSCode Version: 1.9.0-insiders
  • OS Version: Windows 10 x64 Pro

Steps to Reproduce:

  1. Open any file in VSCode (We will call this tab A)
  2. Create new untitled tab and make changes but do not save (We will call this tab B)
  3. Switch back to tab A
  4. Right click tab A select close others

I think the 'Do you want to save the changes you made to Untitled-1?' should switch to the appropriate tab (in this case tab B) to show the user the contents before they decide to delete them forever.

@bpasero bpasero added feature-request Request for new features or functionality workbench-tabs VS Code editor tab issues labels Dec 20, 2016
@jonatino
Copy link
Author

I will take a stab at this :)

@jontro
Copy link

jontro commented Jun 13, 2017

In addition to this it would be great if all saved files will be closed automatically even if you press cancel

@bpasero bpasero removed the workbench label Nov 16, 2017
@bpasero bpasero self-assigned this Dec 4, 2017
@bpasero bpasero modified the milestones: On Deck, November 2017 Dec 4, 2017
@bpasero bpasero added the verification-needed Verification of issue is requested label Dec 5, 2017
@bpasero bpasero closed this as completed in 47f3d9e Dec 5, 2017
@kieferrm kieferrm added verified Verification succeeded verification-found Issue verification failed and removed verification-needed Verification of issue is requested verified Verification succeeded labels Dec 5, 2017
@kieferrm
Copy link
Member

kieferrm commented Dec 5, 2017

This works as expected on Widows. On macOS, the untitled editor is not revealed.

@kieferrm kieferrm reopened this Dec 5, 2017
@bpasero
Copy link
Member

bpasero commented Dec 6, 2017

@kieferrm any steps to reproduce?

@bpasero bpasero added the info-needed Issue requires more information from poster label Dec 6, 2017
@bpasero
Copy link
Member

bpasero commented Dec 6, 2017

I speculate that @kieferrm tried to verify this on yesterdays insider build but the fix is only in todays insider build.

@bpasero bpasero closed this as completed Dec 6, 2017
@bpasero bpasero added verification-needed Verification of issue is requested and removed verification-found Issue verification failed labels Dec 6, 2017
@kieferrm
Copy link
Member

kieferrm commented Dec 6, 2017

@bpasero I just retried on the latest insider and it's working fine. It still puzzles me though, since when I saw the discrepancy between the platforms I compared the build ids and commit ids and they were the same.

@bpasero
Copy link
Member

bpasero commented Dec 6, 2017

@kieferrm well there is actually a timing issue with my fix because opening a modal dialog (like the one you get when you are asked to save the file before closing) stops the entire JS process and rendering. So, if the dialog manages to get into the way of me trying to reveal the editor that is to be saved, you will not see the current editor getting revealed in time.

For that I do a bit of trickery where I wait for 2 request animation frames before showing the modal dialog. In my testing I could not get the issue you describe but I am also thinking that it might still happen if the renderer is slow doing rendering...

@sandy081 sandy081 added the verified Verification succeeded label Dec 7, 2017
@sandy081
Copy link
Member

sandy081 commented Dec 7, 2017

I see the Unsaved tab before the dialog shows up.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster verification-needed Verification of issue is requested verified Verification succeeded workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

5 participants