microsoft / microsoft/vscode

Change flow when viewing .code-workspace file contents

Open
#335,090 0 comments 0 reactions 1 assignee Claimed by @sandy081 View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Hi, I would like to suggest a flow improvement to a situation I just encountered which cost me a valuable unsaved file.

I am using a VSCode window to write notes during new PC setup and to open various instruction files that don't lie within the main project repository.

There was a *.code-workspace file within a directory, I opened it inside the editor as a text file, then there was a button [Open Workspace], which I wanted to do.

I was then prompted:
> Do you want to save the changes you made to onboarding.md?
> Your changes will be lost if you don't save them.
> [Save] [Don't save] [Cancel]

Now the issue is twofold.

1) I expected that the button will open said workspace in a new window and that it will keep my current adhoc "notes" window intact
2) I accidentally hit [Don't save] instead of [Cancel] as I rashly interpreted the action as "don't close my current window"

This instantly resulted in a horror situation.

I tried consulting internet to see if there is a viable recovery path, I tried vscode local history, I tried logs, I tried temp folder and .vscode storage. I was not able to recover my recent changes, only the latest saved changes from yesterday.

## The suggestion

When there are other editors open other than just the .code-workspace, pressing [Open Workspace] should result in a NEW window opened, so that the existing editors are not affected.

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.