Skip to content

Commit

Permalink
editors - remove overrideId from input (#99123)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jun 6, 2020
1 parent 0f97704 commit c15e3a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 0 additions & 5 deletions src/vs/platform/editor/common/editor.ts
Expand Up @@ -58,11 +58,6 @@ export interface IBaseResourceEditorInput {
* looking at the scheme of the resource(s).
*/
readonly forceUntitled?: boolean;

/**
* An optional id to override the editor used to edit the resource, e.g. custom editor.
*/
readonly overrideId?: string;
}

export interface IResourceEditorInput extends IBaseResourceEditorInput {
Expand Down
2 changes: 2 additions & 0 deletions src/vs/workbench/browser/layout.ts
Expand Up @@ -476,6 +476,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
}

private initLayoutState(lifecycleService: ILifecycleService, fileService: IFileService): void {

// Default Layout
this.applyDefaultLayout(this.environmentService, this.storageService);

// Fullscreen
Expand Down
12 changes: 8 additions & 4 deletions src/vs/workbench/common/editor.ts
Expand Up @@ -1032,7 +1032,7 @@ export class TextEditorOptions extends EditorOptions implements ITextEditorOptio
return undefined;
}

return TextEditorOptions.create({ ...input.options, overrideId: input.overrideId });
return TextEditorOptions.create(input.options);
}

/**
Expand Down Expand Up @@ -1363,14 +1363,18 @@ export async function pathsToEditors(paths: IPathData[] | undefined, fileService
startLineNumber: path.lineNumber,
startColumn: path.columnNumber || 1
},
pinned: true
} : { pinned: true };
pinned: true,
overrideId: path.overrideId
} : {
pinned: true,
overrideId: path.overrideId
};

let input: IResourceEditorInput | IUntitledTextResourceEditorInput;
if (!exists) {
input = { resource, options, forceUntitled: true };
} else {
input = { resource, options, forceFile: true, overrideId: path.overrideId };
input = { resource, options, forceFile: true };
}

return input;
Expand Down

0 comments on commit c15e3a6

Please sign in to comment.