mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
untitled - merge createOrGet and loadOrCreate into one
This commit is contained in:
@@ -227,12 +227,12 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
|
||||
}
|
||||
|
||||
private _doCreateUntitled(resource?: URI, mode?: string, initialValue?: string): Promise<URI> {
|
||||
return this._untitledTextEditorService.loadOrCreate({
|
||||
return this._untitledTextEditorService.createOrGet({
|
||||
resource,
|
||||
mode,
|
||||
initialValue,
|
||||
useResourcePath: Boolean(resource && resource.path)
|
||||
}).then(model => {
|
||||
}).resolve().then(model => {
|
||||
const resource = model.resource;
|
||||
|
||||
if (!this._modelIsSynced.has(resource.toString())) {
|
||||
|
||||
Reference in New Issue
Block a user