parent
1e9c0a643e
commit
36fe84236d
3 changed files with 8 additions and 7 deletions
|
@ -115,7 +115,7 @@ export class TerminalTabbedView extends Disposable {
|
|||
|
||||
_configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration('terminal.integrated.tabs.enabled') ||
|
||||
e.affectsConfiguration('terminal.integrated.tabs.hideForSingle')) {
|
||||
e.affectsConfiguration('terminal.integrated.tabs.hideCondition')) {
|
||||
this._refreshShowTabs();
|
||||
} else if (e.affectsConfiguration('terminal.integrated.tabs.location')) {
|
||||
this._tabTreeIndex = this._terminalService.configHelper.config.tabs.location === 'left' ? 0 : 1;
|
||||
|
@ -150,7 +150,7 @@ export class TerminalTabbedView extends Disposable {
|
|||
|
||||
private _shouldShowTabs(): boolean {
|
||||
const enable = this._terminalService.configHelper.config.tabs.enabled;
|
||||
const hideForSingle = this._terminalService.configHelper.config.tabs.hideForSingle;
|
||||
const hideForSingle = this._terminalService.configHelper.config.tabs.hideCondition === 'singleTerminal';
|
||||
return enable && (!hideForSingle || (hideForSingle && this._terminalService.terminalInstances.length > 1));
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ export interface ITerminalConfiguration {
|
|||
enablePersistentSessions: boolean;
|
||||
tabs: {
|
||||
enabled: boolean;
|
||||
hideForSingle: boolean;
|
||||
hideCondition: 'never' | 'singleTerminal';
|
||||
showActiveTerminal: 'always' | 'singleTerminal' | 'singleTerminalOrNarrow' | 'never';
|
||||
location: 'left' | 'right';
|
||||
focusMode: 'singleClick' | 'doubleClick';
|
||||
|
|
|
@ -306,10 +306,11 @@ export const terminalConfiguration: IConfigurationNode = {
|
|||
type: 'boolean',
|
||||
default: true,
|
||||
},
|
||||
'terminal.integrated.tabs.hideForSingle': {
|
||||
description: localize('terminal.integrated.tabs.hideForSingle', 'Hides the terminal tabs view when there is only a single terminal instance.'),
|
||||
type: 'boolean',
|
||||
default: true
|
||||
'terminal.integrated.tabs.hideCondition': {
|
||||
description: localize('terminal.integrated.tabs.hideCondition', 'Controls whether the terminal tabs view will hide under certain conditions.'),
|
||||
type: 'string',
|
||||
enum: ['never', 'singleTerminal'],
|
||||
default: 'singleTerminal',
|
||||
},
|
||||
'terminal.integrated.tabs.showActiveTerminal': {
|
||||
description: localize('terminal.integrated.tabs.showActiveTerminal', 'Shows the active terminal information in the view, this is particularly useful when the title within the tabs aren\'t visible.'),
|
||||
|
|
Loading…
Reference in a new issue