diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts index 8c29e07887330..36a7e3037d23b 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts @@ -110,7 +110,7 @@ export class SearchEditorInput extends EditorInput { const input = this; const workingCopyAdapter = new class implements IWorkingCopy { - readonly resource = input.backingUri ?? input.modelUri; + readonly resource = input.modelUri; get name() { return input.getName(); } readonly capabilities = input.isUntitled() ? WorkingCopyCapabilities.Untitled : 0; readonly onDidChangeDirty = input.onDidChangeDirty; diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts index 038ddda46724f..fd868994e0867 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts @@ -34,7 +34,7 @@ export class SearchEditorModel { @IModeService private readonly modeService: IModeService) { this.onModelResolved = new Promise(resolve => this.resolveContents = resolve); this.onModelResolved.then(model => this.cachedContentsModel = model); - this.ongoingResolve = backupService.resolve(existingData.backingUri ?? modelUri) + this.ongoingResolve = backupService.resolve(modelUri) .then(backup => modelService.getModel(modelUri) ?? (backup ? modelService.createModel(backup.value, modeService.create('search-result'), modelUri) : undefined)) .then(model => { if (model) { this.resolveContents(model); } }); }