Skip to content

Commit

Permalink
re #102503. allow open notebook on the side.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Nov 24, 2020
1 parent 9ce365f commit c3e1f0e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/vs/workbench/browser/parts/editor/editorCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,20 @@ function registerOpenEditorAPICommands(): void {
const quickInputService = accessor.get(IQuickInputService);

const [resource, id, optionsArg, columnArg] = payload;
let group: IEditorGroup | undefined = undefined;

if (columnArg === SIDE_GROUP) {
const direction = preferredSideBySideGroupDirection(configurationService);

let neighbourGroup = editorGroupsService.findGroup({ direction });
if (!neighbourGroup) {
neighbourGroup = editorGroupsService.addGroup(editorGroupsService.activeGroup, direction);
}
group = neighbourGroup;
} else {
group = editorGroupsService.getGroup(viewColumnToEditorGroup(editorGroupsService, columnArg)) ?? editorGroupsService.activeGroup;
}

const group = editorGroupsService.getGroup(viewColumnToEditorGroup(editorGroupsService, columnArg)) ?? editorGroupsService.activeGroup;
const textOptions: ITextEditorOptions = optionsArg ? { ...optionsArg, override: false } : { override: false };

const input = editorService.createEditorInput({ resource: URI.revive(resource) });
Expand Down

0 comments on commit c3e1f0e

Please sign in to comment.