Skip to content

Commit 7177658

Browse files
author
Jackson Kearl
committed
Revert "Fix microsoft#98766 - Reloading a dirty saved search editor causes a phantom tab to appear"
This reverts commit 028241b. This fixes microsoft#99621, but re-introduces microsoft#98766 I'm not sure of a way to remove both bugs, it will likely involve large refactorings.
1 parent 5dc7025 commit 7177658

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class SearchEditorInput extends EditorInput {
110110

111111
const input = this;
112112
const workingCopyAdapter = new class implements IWorkingCopy {
113-
readonly resource = input.backingUri ?? input.modelUri;
113+
readonly resource = input.modelUri;
114114
get name() { return input.getName(); }
115115
readonly capabilities = input.isUntitled() ? WorkingCopyCapabilities.Untitled : 0;
116116
readonly onDidChangeDirty = input.onDidChangeDirty;

src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class SearchEditorModel {
3434
@IModeService private readonly modeService: IModeService) {
3535
this.onModelResolved = new Promise<ITextModel>(resolve => this.resolveContents = resolve);
3636
this.onModelResolved.then(model => this.cachedContentsModel = model);
37-
this.ongoingResolve = backupService.resolve(existingData.backingUri ?? modelUri)
37+
this.ongoingResolve = backupService.resolve(modelUri)
3838
.then(backup => modelService.getModel(modelUri) ?? (backup ? modelService.createModel(backup.value, modeService.create('search-result'), modelUri) : undefined))
3939
.then(model => { if (model) { this.resolveContents(model); } });
4040
}

0 commit comments

Comments
 (0)