mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
@@ -109,9 +109,6 @@ export const enum TerminalSettingId {
|
||||
ShellIntegrationEnabled = 'terminal.integrated.shellIntegration.enabled',
|
||||
ShellIntegrationShowWelcome = 'terminal.integrated.shellIntegration.showWelcome',
|
||||
ShellIntegrationDecorationsEnabled = 'terminal.integrated.shellIntegration.decorationsEnabled',
|
||||
ShellIntegrationDecorationIcon = 'terminal.integrated.shellIntegration.decorationIcon',
|
||||
ShellIntegrationDecorationIconError = 'terminal.integrated.shellIntegration.decorationIconError',
|
||||
ShellIntegrationDecorationIconSuccess = 'terminal.integrated.shellIntegration.decorationIconSuccess',
|
||||
ShellIntegrationCommandHistory = 'terminal.integrated.shellIntegration.history',
|
||||
SmoothScrolling = 'terminal.integrated.smoothScrolling'
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ const enum DecorationSelector {
|
||||
Default = 'default',
|
||||
Codicon = 'codicon',
|
||||
XtermDecoration = 'xterm-decoration',
|
||||
GenericMarkerIcon = 'codicon-circle-small-filled',
|
||||
OverviewRuler = '.xterm-decoration-overview-ruler'
|
||||
}
|
||||
|
||||
@@ -79,11 +78,7 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
|
||||
this._hoverDelayer = this._register(new Delayer(this._configurationService.getValue('workbench.hover.delay')));
|
||||
|
||||
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration(TerminalSettingId.ShellIntegrationDecorationIcon) ||
|
||||
e.affectsConfiguration(TerminalSettingId.ShellIntegrationDecorationIconSuccess) ||
|
||||
e.affectsConfiguration(TerminalSettingId.ShellIntegrationDecorationIconError)) {
|
||||
this._refreshStyles();
|
||||
} else if (e.affectsConfiguration(TerminalSettingId.FontSize) || e.affectsConfiguration(TerminalSettingId.LineHeight)) {
|
||||
if (e.affectsConfiguration(TerminalSettingId.FontSize) || e.affectsConfiguration(TerminalSettingId.LineHeight)) {
|
||||
this.refreshLayouts();
|
||||
} else if (e.affectsConfiguration('workbench.colorCustomizations')) {
|
||||
this._refreshStyles(true);
|
||||
@@ -338,7 +333,7 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
|
||||
element.classList.add(DecorationSelector.CommandDecoration, DecorationSelector.Codicon, DecorationSelector.XtermDecoration);
|
||||
|
||||
if (genericMarkProperties) {
|
||||
element.classList.add(DecorationSelector.DefaultColor, DecorationSelector.GenericMarkerIcon);
|
||||
element.classList.add(DecorationSelector.DefaultColor, ...Codicon.terminalDecorationMark.classNamesArray);
|
||||
if (!genericMarkProperties.hoverMessage) {
|
||||
//disable the mouse pointer
|
||||
element.classList.add(DecorationSelector.Default);
|
||||
@@ -348,12 +343,12 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
|
||||
this._updateCommandDecorationVisibility(element);
|
||||
if (exitCode === undefined) {
|
||||
element.classList.add(DecorationSelector.DefaultColor, DecorationSelector.Default);
|
||||
element.classList.add(`codicon-${this._configurationService.getValue(TerminalSettingId.ShellIntegrationDecorationIcon)}`);
|
||||
element.classList.add(...Codicon.terminalDecorationIncomplete.classNamesArray);
|
||||
} else if (exitCode) {
|
||||
element.classList.add(DecorationSelector.ErrorColor);
|
||||
element.classList.add(`codicon-${this._configurationService.getValue(TerminalSettingId.ShellIntegrationDecorationIconError)}`);
|
||||
element.classList.add(...Codicon.terminalDecorationError.classNamesArray);
|
||||
} else {
|
||||
element.classList.add(`codicon-${this._configurationService.getValue(TerminalSettingId.ShellIntegrationDecorationIconSuccess)}`);
|
||||
element.classList.add(...Codicon.terminalDecorationSuccess.classNamesArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -453,11 +448,7 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
|
||||
private async _showConfigureCommandDecorationsQuickPick() {
|
||||
const quickPick = this._quickInputService.createQuickPick();
|
||||
quickPick.items = [
|
||||
{ id: 'a', label: localize('changeDefaultIcon', 'Change default icon') },
|
||||
{ id: 'b', label: localize('changeSuccessIcon', 'Change success icon') },
|
||||
{ id: 'c', label: localize('changeErrorIcon', 'Change error icon') },
|
||||
{ type: 'separator' },
|
||||
{ id: 'd', label: localize('toggleVisibility', 'Toggle visibility') },
|
||||
{ id: 'a', label: localize('toggleVisibility', 'Toggle visibility') },
|
||||
];
|
||||
quickPick.canSelectMany = false;
|
||||
quickPick.onDidAccept(async e => {
|
||||
@@ -465,10 +456,7 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
|
||||
const result = quickPick.activeItems[0];
|
||||
let iconSetting: string | undefined;
|
||||
switch (result.id) {
|
||||
case 'a': iconSetting = TerminalSettingId.ShellIntegrationDecorationIcon; break;
|
||||
case 'b': iconSetting = TerminalSettingId.ShellIntegrationDecorationIconSuccess; break;
|
||||
case 'c': iconSetting = TerminalSettingId.ShellIntegrationDecorationIconError; break;
|
||||
case 'd': this._showToggleVisibilityQuickPick(); break;
|
||||
case 'a': this._showToggleVisibilityQuickPick(); break;
|
||||
}
|
||||
if (iconSetting) {
|
||||
this._showChangeIconQuickPick(iconSetting);
|
||||
|
||||
@@ -116,21 +116,6 @@ const terminalConfiguration: IConfigurationNode = {
|
||||
default: 'view',
|
||||
description: localize('terminal.integrated.defaultLocation', "Controls where newly created terminals will appear.")
|
||||
},
|
||||
[TerminalSettingId.ShellIntegrationDecorationIconSuccess]: {
|
||||
type: 'string',
|
||||
default: 'primitive-dot',
|
||||
markdownDescription: localize('terminal.integrated.shellIntegration.decorationIconSuccess', "Controls the icon that will be used for each command in terminals with shell integration enabled that do not have an associated exit code. Set to {0} to hide the icon or disable decorations with {1}.", '`\"\"`', '`#terminal.integrated.shellIntegration.decorationsEnabled#`')
|
||||
},
|
||||
[TerminalSettingId.ShellIntegrationDecorationIconError]: {
|
||||
type: 'string',
|
||||
default: 'error-small',
|
||||
markdownDescription: localize('terminal.integrated.shellIntegration.decorationIconError', "Controls the icon that will be used for each command in terminals with shell integration enabled that do have an associated exit code. Set to {0} to hide the icon or disable decorations with {1}.", '`\"\"`', '`#terminal.integrated.shellIntegration.decorationsEnabled#`')
|
||||
},
|
||||
[TerminalSettingId.ShellIntegrationDecorationIcon]: {
|
||||
type: 'string',
|
||||
default: 'circle-outline',
|
||||
markdownDescription: localize('terminal.integrated.shellIntegration.decorationIcon', "Controls the icon that will be used for skipped/empty commands. Set to {0} to hide the icon or disable decorations with {1}.", '`\"\"`', '`#terminal.integrated.shellIntegration.decorationsEnabled#`')
|
||||
},
|
||||
[TerminalSettingId.TabsFocusMode]: {
|
||||
type: 'string',
|
||||
enum: ['singleClick', 'doubleClick'],
|
||||
|
||||
Reference in New Issue
Block a user