untitled - bring back loadOrCreate()

This commit is contained in:
Benjamin Pasero
2020-01-16 13:11:10 +01:00
parent a8f2db516b
commit 70f381a7b9
7 changed files with 27 additions and 14 deletions

View File

@@ -216,12 +216,12 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
}
private _doCreateUntitled(resource?: URI, mode?: string, initialValue?: string): Promise<URI> {
return this._textFileService.untitled.createOrGet({
return this._textFileService.untitled.loadOrCreate({
resource,
mode,
initialValue,
useResourcePath: Boolean(resource && resource.path)
}).resolve().then(model => {
}).then(model => {
const resource = model.resource;
if (!this._modelIsSynced.has(resource.toString())) {