Skip to content

Commit

Permalink
polish for #50667
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed May 30, 2018
1 parent 88aa6c4 commit 3f895da
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/vs/workbench/browser/parts/editor/editorActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class SplitEditorDownAction extends ExecuteCommandAction {
export class JoinTwoGroupsAction extends Action {

public static readonly ID = 'workbench.action.joinTwoGroups';
public static readonly LABEL = nls.localize('joinTwoGroups', "Join Editors of Two Groups");
public static readonly LABEL = nls.localize('joinTwoGroups', "Join Editor Group with Next Group");

constructor(
id: string,
Expand All @@ -161,12 +161,7 @@ export class JoinTwoGroupsAction extends Action {
sourceGroup = this.editorGroupService.activeGroup;
}

const targetGroup =
this.editorGroupService.findGroup({ direction: GroupDirection.RIGHT }, sourceGroup) ||
this.editorGroupService.findGroup({ direction: GroupDirection.DOWN }, sourceGroup) ||
this.editorGroupService.findGroup({ direction: GroupDirection.UP }, sourceGroup) ||
this.editorGroupService.findGroup({ direction: GroupDirection.LEFT }, sourceGroup);

const targetGroup = this.editorGroupService.findGroup({ direction: GroupDirection.RIGHT }, sourceGroup) || this.editorGroupService.findGroup({ direction: GroupDirection.DOWN }, sourceGroup);
if (targetGroup && sourceGroup !== targetGroup) {
this.editorGroupService.mergeGroup(sourceGroup, targetGroup);
}
Expand All @@ -178,7 +173,7 @@ export class JoinTwoGroupsAction extends Action {
export class JoinAllGroupsAction extends Action {

public static readonly ID = 'workbench.action.joinAllGroups';
public static readonly LABEL = nls.localize('joinAllGroups', "Join Editors of All Groups");
public static readonly LABEL = nls.localize('joinAllGroups', "Join All Editor Groups");

constructor(
id: string,
Expand Down

0 comments on commit 3f895da

Please sign in to comment.