-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersnotebookverifiedVerification succeededVerification succeededworkbench-untitled-editorsManaging of untitled editors in workbench windowManaging of untitled editors in workbench window
Milestone
Description
The workbench distinguishes untitled editors:
- without associated file path
- with associated file path
The former is the usual untitled editor that you get when you pick File > New File and the editor will not appear dirty until you start typing contents. The latter is for the scenario of the user typing code <some path>/<some file>
pointing to a file that does not exist. We then:
- open an untitled editor with the associated file path
- show the editor dirty even without typing contents
- do not ask for a file path when saving (because we got a file path associated already).
This flow does not seem to work for notebooks yet. Steps to Reproduce:
- type
code-insiders /<some path>/new.github-issues
- an untitled notebook opens
List of issues:
- there is a "1 unsaved" indicator that is not originating from the notebook itself but what seems to be an untitled editor that probably was created in the beginning and overridden (caused by Editor overrides should work with untitled inputs (without resource) #124352 and I suggest we keep this issue there)
- the notebook does not seem to have an associated file path because it does not appear dirty and it asks to for a file path when saving
@jrieken for this purpose the IUntitledFileWorkingCopyManager
provides an overload to the resolve
method called INewUntitledFileWorkingCopyWithAssociatedResourceOptions
. If you pass on the path as associated resource, everything should work fine.
//cc @lramos15
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersnotebookverifiedVerification succeededVerification succeededworkbench-untitled-editorsManaging of untitled editors in workbench windowManaging of untitled editors in workbench window