Skip to content

Commit 5e1674b

Browse files
authored
include hideFromUser terminals in terminalService.instances (microsoft#210698)
1 parent 2cc4b3d commit 5e1674b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class TerminalService extends Disposable implements ITerminalService {
9292
get restoredGroupCount(): number { return this._restoredGroupCount; }
9393

9494
get instances(): ITerminalInstance[] {
95-
return this._terminalGroupService.instances.concat(this._terminalEditorService.instances);
95+
return this._terminalGroupService.instances.concat(this._terminalEditorService.instances).concat(this._backgroundedTerminalInstances);
9696
}
9797
get detachedInstances(): Iterable<IDetachedTerminalInstance> {
9898
return this._detachedXterms;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class TerminalViewPane extends ViewPane {
9191
this._register(this._terminalService.onDidChangeInstances(() => {
9292
// If the first terminal is opened, hide the welcome view
9393
// and if the last one is closed, show it again
94-
if (this._hasWelcomeScreen() && this._terminalService.instances.length <= 1) {
94+
if (this._hasWelcomeScreen() && this._terminalGroupService.instances.length <= 1) {
9595
this._onDidChangeViewWelcomeState.fire();
9696
}
9797
if (!this._parentDomElement) { return; }
@@ -100,7 +100,7 @@ export class TerminalViewPane extends ViewPane {
100100
this._createTabsView();
101101
}
102102
// If we just opened our first terminal, layout
103-
if (this._terminalService.instances.length === 1) {
103+
if (this._terminalGroupService.instances.length === 1) {
104104
this.layoutBody(this._parentDomElement.offsetHeight, this._parentDomElement.offsetWidth);
105105
}
106106
}));

0 commit comments

Comments
 (0)