diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 76672b9463f395fbc764bce302cccd573c2c8f78..60e067bf07159bd88c20ba4102d723fc7c8e9073 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -132,16 +132,16 @@ export class BaseSplitEditorGroupAction extends Action { group = this.nextEditorGroupsService.activeGroup; } - const activeEditor = group.activeEditor; - if (activeEditor instanceof EditorInput && !activeEditor.supportsSplitEditor()) { - return TPromise.as(false); - } - // Add group const newGroup = this.nextEditorGroupsService.addGroup(group, this.direction, { activate: true }); - // Open editor + // Open editor (unless it cannot split) + const activeEditor = group.activeEditor; if (activeEditor) { + if (activeEditor instanceof EditorInput && !activeEditor.supportsSplitEditor()) { + return TPromise.as(false); + } + let options: EditorOptions; const codeEditor = getCodeEditor(group.activeControl.getControl()); if (codeEditor) {