-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -92,7 +92,11 @@ export interface INewOrExistingUntitledFileWorkingCopyOptions extends INewUntitl | |||
*/ | ||||
untitledResource: URI; | ||||
|
||||
scratchPad?: boolean; | ||||
/** | ||||
* A flag that will prevent the working copy from appearing dirty in the UI | ||||
* and not show a confirmation dialog when closed with unsaved content. | ||||
*/ | ||||
isScratchpad?: boolean; | ||||
} | ||||
|
||||
type IInternalUntitledFileWorkingCopyOptions = INewUntitledFileWorkingCopyOptions & INewUntitledFileWorkingCopyWithAssociatedResourceOptions & INewOrExistingUntitledFileWorkingCopyOptions; | ||||
|
@@ -169,7 +173,7 @@ export class UntitledFileWorkingCopyManager<M extends IUntitledFileWorkingCopyMo | |||
// Handle untitled resource | ||||
else if (options.untitledResource?.scheme === Schemas.untitled) { | ||||
massagedOptions.untitledResource = options.untitledResource; | ||||
massagedOptions.scratchPad = options.scratchPad; | ||||
massagedOptions.isScratchpad = options.isScratchpad; | ||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
amunger
Author
Contributor
|
untitledResource = URI.from({ scheme: Schemas.untitled, path: options.isScratchpad ? `Scratchpad-${counter}` : `Untitled-${counter}` }); |
In that PR I can adjust the untitled working copy to behave the same!
@amunger while looking into adopting this for untitled text files, I noticed how here you only support the
isScratchpad
option if an untitled resource is passed in. But I wonder why? I think scratchpad is independent from having a resource, no? Then I think this could move intoINewUntitledFileWorkingCopyOptions
?