open query editor as default editor (#15874)

This commit is contained in:
Alan Ren
2021-06-22 23:53:55 -07:00
committed by GitHub
parent 4707c1601c
commit e21f56d719
2 changed files with 5 additions and 5 deletions

View File

@@ -286,7 +286,8 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
if (this.isEmpty) { if (this.isEmpty) {
EventHelper.stop(e); EventHelper.stop(e);
this.openEditor(this.editorService.createEditorInput({ forceUntitled: true }), EditorOptions.create({ pinned: true })); // {{SQL CARBON EDIT}} - use editor service to open editor, which will go through the override step and resolve to UntitledQueryEditorInput.
this.editorService.openEditor(this.editorService.createEditorInput({ forceUntitled: true }), EditorOptions.create({ pinned: true }));
} }
})); }));

View File

@@ -236,14 +236,13 @@ export class TabsTitleControl extends TitleControl {
} }
EventHelper.stop(e); EventHelper.stop(e);
// {{SQL CARBON EDIT}} - use editor service to open editor, which will go through the override step and resolve to UntitledQueryEditorInput.
this.group.openEditor( this.editorService.openEditor(
this.editorService.createEditorInput({ forceUntitled: true }), this.editorService.createEditorInput({ forceUntitled: true }),
{ {
pinned: true, // untitled is always pinned pinned: true, // untitled is always pinned
index: this.group.count // always at the end index: this.group.count // always at the end
} }, this.group);
);
})); }));
}); });