-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Allow Untitled documents that do not require save dialog when closing #154664
Comments
I have seen some extensions use |
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
Just came across this: #154457 Not sure how it relates and whether the handler will be available to extension authors? |
@riccardoferretti I guess this is a special case of #154457. My request is to let untitled editors not require any Save/Discard/Cancel Dialog hiccup, under the control of the extension which creates the editor with pre-created content. Of course Save As, Pinning, etc should still be possible. |
This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
Extensions may generate some content and show it in Untitled document with a specific language id so that syntax coloring and other possible language-specific features are activated. For example, the Helm extras loads Manifests, Templates, Values, Hooks, or Notes from a Helm release. It sets the correct language id for these Untitled documents. However, these documents are just previews, and as such users should not be required to save these preview documents. If they simply want to close the documents they should not encounter the Save dialog. Of course, they can click on Don't Save, but that is a hiccup. This hiccup also happens when closing the VSCode window. I guess this could be done by clearing the dirty flag of the editor/document. For security reasons, only the creating extension should be allowed to do so. Or this could be a flag while creating the document in the first place via
vscode.workspace.openTextDocument
'soptions
parameter. For example:options?: { language?: string; content?: string; saveNotRequired?: boolean;}
The text was updated successfully, but these errors were encountered: