Skip to content

Commit

Permalink
Revert "Fix #98766 - Reloading a dirty saved search editor causes a p…
Browse files Browse the repository at this point in the history
…hantom tab to appear"

This reverts commit 028241b.
This fixes #99621, but re-introduces #98766
I'm not sure of a way to remove both bugs, it will likely involve large refactorings.
  • Loading branch information
Jackson Kearl committed Jul 2, 2020
1 parent 5dc7025 commit 7177658
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class SearchEditorModel {
@IModeService private readonly modeService: IModeService) {
this.onModelResolved = new Promise<ITextModel>(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); } });
}
Expand Down

0 comments on commit 7177658

Please sign in to comment.