提交 0f151ee4 编写于 作者: B Benjamin Pasero

grid - openSideBySideDirection 💄

上级 dfb6572f
......@@ -212,11 +212,11 @@ configurationRegistry.registerConfiguration({
'default': 'right',
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'editorOpenPositioning' }, "Controls where editors open. Select 'left' or 'right' to open editors to the left or right of the currently active one. Select 'first' or 'last' to open editors independently from the currently active one.")
},
'workbench.editor.openToTheSideDirection': {
'workbench.editor.openSideBySideDirection': {
'type': 'string',
'enum': ['left', 'right', 'up', 'down'],
'default': 'right',
'description': nls.localize('openToTheSideDirection', "Controls where editors opened through the Open to Side option open. ")
'description': nls.localize('sideBySideDirection', "Controls the default direction of editors that are opened side by side (e.g. from the explorer). By default, editors will open on the rigth hand side of the currently active one.")
},
'workbench.editor.revealIfOpen': {
'type': 'boolean',
......
......@@ -269,9 +269,9 @@ export class NextEditorService extends Disposable implements INextEditorService
}
private createSideBySideGroup(): INextEditorGroup {
const direction = this.configurationService.getValue<'left' | 'right' | 'up' | 'down'>('workbench.editor.openToTheSideDirection');
const direction = this.configurationService.getValue<'left' | 'right' | 'up' | 'down'>('workbench.editor.openSideBySideDirection');
let groupDirection: GroupDirection = GroupDirection.RIGHT;
let groupDirection: GroupDirection;
switch (direction) {
case 'left': groupDirection = GroupDirection.LEFT; break;
case 'right': groupDirection = GroupDirection.RIGHT; break;
......@@ -279,7 +279,8 @@ export class NextEditorService extends Disposable implements INextEditorService
case 'down': groupDirection = GroupDirection.DOWN; break;
default: groupDirection = GroupDirection.RIGHT;
}
return this.nextEditorGroupsService.addGroup(this.nextEditorGroupsService.activeGroup, groupDirection);
return this.nextEditorGroupsService.addGroup(this.nextEditorGroupsService.activeGroup, groupDirection); // TODO@grid this should use an existing side group if there is one
}
private toOptions(options?: IEditorOptions | EditorOptions): EditorOptions {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册