parent
51bbf51f0f
commit
f19e450b57
2 changed files with 11 additions and 2 deletions
|
@ -12,6 +12,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
|||
import { ITerminalInstance, Direction, ITerminalGroup, ITerminalService, ITerminalInstanceService } from 'vs/workbench/contrib/terminal/browser/terminal';
|
||||
import { ViewContainerLocation, IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { IShellLaunchConfig, ITerminalTabLayoutInfoById } from 'vs/platform/terminal/common/terminal';
|
||||
import { TerminalStatus } from 'vs/workbench/contrib/terminal/browser/terminalStatusList';
|
||||
|
||||
const SPLIT_PANE_MIN_SIZE = 120;
|
||||
|
||||
|
@ -466,14 +467,14 @@ export class TerminalGroup extends Disposable implements ITerminalGroup {
|
|||
// this is required when the group is used as part of a tree.
|
||||
return '';
|
||||
}
|
||||
let title = this.terminalInstances[0].title;
|
||||
let title = this.terminalInstances[0].title + this._getBellTitle(this.terminalInstances[0]);
|
||||
if (this.terminalInstances[0].shellLaunchConfig.description) {
|
||||
title += ` (${this.terminalInstances[0].shellLaunchConfig.description})`;
|
||||
}
|
||||
for (let i = 1; i < this.terminalInstances.length; i++) {
|
||||
const instance = this.terminalInstances[i];
|
||||
if (instance.title) {
|
||||
title += `, ${instance.title}`;
|
||||
title += `, ${instance.title + this._getBellTitle(instance)}`;
|
||||
if (instance.shellLaunchConfig.description) {
|
||||
title += ` (${instance.shellLaunchConfig.description})`;
|
||||
}
|
||||
|
@ -482,6 +483,13 @@ export class TerminalGroup extends Disposable implements ITerminalGroup {
|
|||
return title;
|
||||
}
|
||||
|
||||
private _getBellTitle(instance: ITerminalInstance) {
|
||||
if (this._terminalService.configHelper.config.enableBell && instance.statusList.statuses.find(e => e.id === TerminalStatus.Bell)) {
|
||||
return '*';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
setVisible(visible: boolean): void {
|
||||
this._isVisible = visible;
|
||||
if (this._groupElement) {
|
||||
|
|
|
@ -360,6 +360,7 @@ class SwitchTerminalActionViewItem extends SelectActionViewItem {
|
|||
this._register(_terminalGroupService.onDidChangeGroups(() => this._updateItems(), this));
|
||||
this._register(_terminalService.onDidChangeConnectionState(() => this._updateItems(), this));
|
||||
this._register(_terminalService.onDidChangeAvailableProfiles(() => this._updateItems(), this));
|
||||
this._register(_terminalService.onDidChangeInstancePrimaryStatus(() => this._updateItems(), this));
|
||||
this._register(attachSelectBoxStyler(this.selectBox, this._themeService));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue