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
2 changes: 2 additions & 0 deletions src/vs/workbench/contrib/terminal/browser/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type { IXtermCore } from './xterm-private.js';
import type { IMenu } from '../../../../platform/actions/common/actions.js';
import type { Barrier } from '../../../../base/common/async.js';
import type { IProgressState } from '@xterm/addon-progress';
import type { IEditorOptions } from '../../../../platform/editor/common/editor.js';
import type { TerminalEditorInput } from './terminalEditorInput.js';

export const ITerminalService = createDecorator<ITerminalService>('terminalService');
Expand Down Expand Up @@ -470,6 +471,7 @@ export interface ICreateTerminalOptions {
export interface TerminalEditorLocation {
viewColumn: GroupIdentifier | SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE | AUX_WINDOW_GROUP_TYPE;
preserveFocus?: boolean;
auxiliary?: IEditorOptions['auxiliary'];
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/vs/workbench/contrib/terminal/browser/terminalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ export function registerTerminalActions() {
const instance = await c.service.createTerminal({
location: {
viewColumn: AUX_WINDOW_GROUP,
}
auxiliary: { compact: true },
},
});
await instance.focusWhenReady();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ export class TerminalEditorService extends Disposable implements ITerminalEditor
options: {
pinned: true,
forceReload: true,
preserveFocus: editorOptions?.preserveFocus
preserveFocus: editorOptions?.preserveFocus,
auxiliary: editorOptions?.auxiliary,
}
}, editorOptions?.viewColumn ?? ACTIVE_GROUP)
};
Expand Down
9 changes: 6 additions & 3 deletions src/vs/workbench/contrib/terminal/browser/terminalMenus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function setupTerminalMenus(): void {
group: TerminalMenuBarGroup.Create,
command: {
id: TerminalCommandId.NewInNewWindow,
title: localize({ key: 'miNewInNewWindow', comment: ['&& denotes a mnemonic'] }, "New in New &&Window"),
title: localize({ key: 'miNewInNewWindow', comment: ['&& denotes a mnemonic'] }, "New Terminal &&Window"),
precondition: ContextKeyExpr.has(TerminalContextKeyStrings.IsOpen)
},
order: 2,
Expand Down Expand Up @@ -724,8 +724,11 @@ export function getTerminalActionBarArgs(location: ITerminalLocationOptions, pro
const splitLocation = (location === TerminalLocation.Editor || (typeof location === 'object' && 'viewColumn' in location && location.viewColumn === ACTIVE_GROUP)) ? { viewColumn: SIDE_GROUP } : { splitActiveTerminal: true };

dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.New, terminalStrings.new, undefined, true, () => terminalService.createAndFocusTerminal())));
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.NewInNewWindow, terminalStrings.newInNewWindow.short, undefined, true, () => terminalService.createAndFocusTerminal({
location: { viewColumn: AUX_WINDOW_GROUP }
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.NewInNewWindow, terminalStrings.newInNewWindow.value, undefined, true, () => terminalService.createAndFocusTerminal({
location: {
viewColumn: AUX_WINDOW_GROUP,
auxiliary: { compact: true },
}
}))));
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.Split, terminalStrings.split.value, undefined, true, () => terminalService.createAndFocusTerminal({
location: splitLocation
Expand Down
5 changes: 1 addition & 4 deletions src/vs/workbench/contrib/terminal/common/terminalStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +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"),
short: localize('newInNewWindow.short', "New in New Window")
},
newInNewWindow: localize2('newInNewWindow', "New Terminal 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
Loading