Skip to content

Commit 423e5da

Browse files
authored
aux - leave compact mode on certain editor events and restore compact mode for terminals (#260302) (#260335)
1 parent 9e91399 commit 423e5da

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,16 @@ export class AuxiliaryEditorPart {
303303
}
304304
}));
305305

306+
disposables.add(editorPart.onDidAddGroup(() => {
307+
updateCompact(false); // leave compact mode when a group is added
308+
}));
309+
310+
disposables.add(editorPart.activeGroup.onDidActiveEditorChange(() => {
311+
if (editorPart.activeGroup.count > 1) {
312+
updateCompact(false); // leave compact mode when more than 1 editor is active
313+
}
314+
}));
315+
306316
// Have a scoped instantiation service that is scoped to the auxiliary window
307317
const scopedInstantiationService = disposables.add(scopedEditorPartInstantiationService.createChild(new ServiceCollection(
308318
[IStatusbarService, this.statusbarService.createScoped(statusbarPart, disposables)]

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ export function registerTerminalActions() {
360360
run: async (c) => {
361361
const instance = await c.service.createTerminal({
362362
location: {
363-
viewColumn: AUX_WINDOW_GROUP
363+
viewColumn: AUX_WINDOW_GROUP,
364+
auxiliary: { compact: true },
364365
},
365366
});
366367
await instance.focusWhenReady();

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,8 @@ export function getTerminalActionBarArgs(location: ITerminalLocationOptions, pro
765765
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.New, terminalStrings.new, undefined, true, () => terminalService.createAndFocusTerminal())));
766766
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.NewInNewWindow, terminalStrings.newInNewWindow.value, undefined, true, () => terminalService.createAndFocusTerminal({
767767
location: {
768-
viewColumn: AUX_WINDOW_GROUP
768+
viewColumn: AUX_WINDOW_GROUP,
769+
auxiliary: { compact: true },
769770
}
770771
}))));
771772
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.Split, terminalStrings.split.value, undefined, true, () => terminalService.createAndFocusTerminal({

0 commit comments

Comments
 (0)