Skip to content

Commit 31beca6

Browse files
committed
New terminal window open in compact mode
Fixes microsoft#259601
1 parent 59c3f0b commit 31beca6

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

src/vs/workbench/contrib/terminal/browser/terminal.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import type { IXtermCore } from './xterm-private.js';
3232
import type { IMenu } from '../../../../platform/actions/common/actions.js';
3333
import type { Barrier } from '../../../../base/common/async.js';
3434
import type { IProgressState } from '@xterm/addon-progress';
35+
import type { IEditorOptions } from '../../../../platform/editor/common/editor.js';
3536

3637
export const ITerminalService = createDecorator<ITerminalService>('terminalService');
3738
export const ITerminalConfigurationService = createDecorator<ITerminalConfigurationService>('terminalConfigurationService');
@@ -469,6 +470,7 @@ export interface ICreateTerminalOptions {
469470
export interface TerminalEditorLocation {
470471
viewColumn: GroupIdentifier | SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE | AUX_WINDOW_GROUP_TYPE;
471472
preserveFocus?: boolean;
473+
auxiliary?: IEditorOptions['auxiliary'];
472474
}
473475

474476
/**

src/vs/workbench/contrib/terminal/browser/terminalActions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ export function registerTerminalActions() {
358358
const instance = await c.service.createTerminal({
359359
location: {
360360
viewColumn: AUX_WINDOW_GROUP,
361-
}
361+
auxiliary: { compact: true },
362+
},
362363
});
363364
await instance.focusWhenReady();
364365
}

src/vs/workbench/contrib/terminal/browser/terminalEditorService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ export class TerminalEditorService extends Disposable implements ITerminalEditor
144144
options: {
145145
pinned: true,
146146
forceReload: true,
147-
preserveFocus: editorOptions?.preserveFocus
147+
preserveFocus: editorOptions?.preserveFocus,
148+
auxiliary: editorOptions?.auxiliary,
148149
}
149150
}, editorOptions?.viewColumn ?? ACTIVE_GROUP)
150151
};

src/vs/workbench/contrib/terminal/browser/terminalMenus.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,10 @@ export function getTerminalActionBarArgs(location: ITerminalLocationOptions, pro
725725

726726
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.New, terminalStrings.new, undefined, true, () => terminalService.createAndFocusTerminal())));
727727
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.NewInNewWindow, terminalStrings.newInNewWindow.short, undefined, true, () => terminalService.createAndFocusTerminal({
728-
location: { viewColumn: AUX_WINDOW_GROUP }
728+
location: {
729+
viewColumn: AUX_WINDOW_GROUP,
730+
auxiliary: { compact: true },
731+
}
729732
}))));
730733
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.Split, terminalStrings.split.value, undefined, true, () => terminalService.createAndFocusTerminal({
731734
location: splitLocation

0 commit comments

Comments
 (0)