Skip to content

Commit f00ad14

Browse files
committed
Retain viewColumn active group when passing contributed profile to exthost
Fixes microsoft#131156
1 parent b0d1e3b commit f00ad14

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,12 @@ export class TerminalService implements ITerminalService {
11581158
if (contributedProfile) {
11591159
const resolvedLocation = this.resolveLocation(options?.location);
11601160
const splitActiveTerminal = typeof options?.location === 'object' && 'splitActiveTerminal' in options.location ? options.location.splitActiveTerminal : false;
1161-
const location = splitActiveTerminal ? resolvedLocation === TerminalLocation.Editor ? { viewColumn: SIDE_GROUP } : { splitActiveTerminal: true } : resolvedLocation;
1161+
let location: TerminalLocation | { viewColumn: number, preserveState?: boolean } | { splitActiveTerminal: boolean } | undefined;
1162+
if (splitActiveTerminal) {
1163+
location = resolvedLocation === TerminalLocation.Editor ? { viewColumn: SIDE_GROUP } : { splitActiveTerminal: true };
1164+
} else {
1165+
location = typeof options?.location === 'object' && 'viewColumn' in options.location ? options.location : resolvedLocation;
1166+
}
11621167
await this._createContributedTerminalProfile(contributedProfile.extensionIdentifier, contributedProfile.id, {
11631168
icon: contributedProfile.icon,
11641169
color: contributedProfile.color,

0 commit comments

Comments
 (0)