Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion src/vs/workbench/contrib/terminal/browser/terminalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import { IConfigurationResolverService } from '../../../services/configurationRe
import { ConfigurationResolverExpression } from '../../../services/configurationResolver/common/configurationResolverExpression.js';
import { editorGroupToColumn } from '../../../services/editor/common/editorGroupColumn.js';
import { IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js';
import { SIDE_GROUP } from '../../../services/editor/common/editorService.js';
import { AUX_WINDOW_GROUP, SIDE_GROUP } from '../../../services/editor/common/editorService.js';
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
import { IPreferencesService } from '../../../services/preferences/common/preferences.js';
import { IRemoteAgentService } from '../../../services/remote/common/remoteAgentService.js';
Expand Down Expand Up @@ -344,6 +344,25 @@ export function registerTerminalActions() {
}
});

registerTerminalAction({
id: TerminalCommandId.NewInNewWindow,
title: terminalStrings.newInNewWindow,
precondition: sharedWhenClause.terminalAvailable,
keybinding: {
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.Backquote,
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyMod.Alt | KeyCode.Backquote },
weight: KeybindingWeight.WorkbenchContrib
},
run: async (c) => {
const instance = await c.service.createTerminal({
location: {
viewColumn: AUX_WINDOW_GROUP,
}
});
await instance.focusWhenReady();
}
});

registerContextualInstanceAction({
id: TerminalCommandId.MoveToEditor,
title: terminalStrings.moveToEditor,
Expand Down
2 changes: 2 additions & 0 deletions src/vs/workbench/contrib/terminal/common/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ export const enum TerminalCommandId {
MoveToEditor = 'workbench.action.terminal.moveToEditor',
MoveToTerminalPanel = 'workbench.action.terminal.moveToTerminalPanel',
MoveIntoNewWindow = 'workbench.action.terminal.moveIntoNewWindow',
NewInNewWindow = 'workbench.action.terminal.newInNewWindow',
SetDimensions = 'workbench.action.terminal.setDimensions',
FocusHover = 'workbench.action.terminal.focusHover',
ShowEnvironmentContributions = 'workbench.action.terminal.showEnvironmentContributions',
Expand Down Expand Up @@ -513,6 +514,7 @@ export const DEFAULT_COMMANDS_TO_SKIP_SHELL: string[] = [
TerminalCommandId.MoveToTerminalPanel,
TerminalCommandId.NewInActiveWorkspace,
TerminalCommandId.New,
TerminalCommandId.NewInNewWindow,
TerminalCommandId.Paste,
TerminalCommandId.PasteSelection,
TerminalCommandId.ResizePaneDown,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const terminalStrings = {
},
moveToEditor: localize2('moveToEditor', "Move Terminal into Editor Area"),
moveIntoNewWindow: localize2('moveIntoNewWindow', "Move Terminal into New Window"),
newInNewWindow: localize2('newInNewWindow', "New Terminal in New Window"),
moveToTerminalPanel: localize2('workbench.action.terminal.moveToTerminalPanel', "Move Terminal into Panel"),
changeIcon: localize2('workbench.action.terminal.changeIcon', "Change Icon..."),
changeColor: localize2('workbench.action.terminal.changeColor', "Change Color..."),
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/services/editor/common/editorGroupColumn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
import { GroupIdentifier } from '../../../common/editor.js';
import { IEditorGroupsService, GroupsOrder, IEditorGroup, preferredSideBySideGroupDirection } from './editorGroupsService.js';
import { ACTIVE_GROUP, ACTIVE_GROUP_TYPE, SIDE_GROUP, SIDE_GROUP_TYPE } from './editorService.js';
import { ACTIVE_GROUP, ACTIVE_GROUP_TYPE, AUX_WINDOW_GROUP, SIDE_GROUP, SIDE_GROUP_TYPE } from './editorService.js';

/**
* A way to address editor groups through a column based system
Expand All @@ -16,7 +16,7 @@ import { ACTIVE_GROUP, ACTIVE_GROUP_TYPE, SIDE_GROUP, SIDE_GROUP_TYPE } from './
export type EditorGroupColumn = number;

export function columnToEditorGroup(editorGroupService: IEditorGroupsService, configurationService: IConfigurationService, column = ACTIVE_GROUP): GroupIdentifier | ACTIVE_GROUP_TYPE | SIDE_GROUP_TYPE {
if (column === ACTIVE_GROUP || column === SIDE_GROUP) {
if (column === ACTIVE_GROUP || column === SIDE_GROUP || column === AUX_WINDOW_GROUP) {
return column; // return early for when column is well known
}

Expand Down
Loading