Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix contributed profile icons #182615

Merged
merged 2 commits into from
May 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
const defaultProfile = (await this._terminalProfileResolverService.getDefaultProfile({ remoteAuthority: this.remoteAuthority, os }));
this.shellLaunchConfig.executable = defaultProfile.path;
this.shellLaunchConfig.args = defaultProfile.args;
this.shellLaunchConfig.icon = defaultProfile.icon;
this.shellLaunchConfig.color = defaultProfile.color;
// Only use default icon and color if they are undefined in the SLC
this.shellLaunchConfig.icon ??= defaultProfile.icon;
this.shellLaunchConfig.color ??= defaultProfile.color;
Copy link
Contributor Author

@tisilent tisilent May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tyriar The 'New Terminal' action requires default profile.

Copy link
Contributor Author

@tisilent tisilent May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issues:
企业微信截图_1684722768662
'New Terminal' using terminal icon, pwsh icon should be used.

After modify, the test is working:
// Only use default icon and color if they are undefined in the SLC if (!this.shellLaunchConfig.isExtensionOwnedTerminal) { this.shellLaunchConfig.icon = defaultProfile.icon; this.shellLaunchConfig.color = defaultProfile.color; } else { this.shellLaunchConfig.icon ??= defaultProfile.icon; this.shellLaunchConfig.color ??= defaultProfile.color; }

I'm not sure if there are better property to distinguish. 😖

}

await this._createProcess();
Expand Down
Loading