diff --git a/src/vs/workbench/contrib/terminal/browser/terminalService.ts b/src/vs/workbench/contrib/terminal/browser/terminalService.ts index f001095e567ff0..6b20b68c1fbe71 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalService.ts @@ -435,7 +435,7 @@ export class TerminalService implements ITerminalService { } } else { // add split terminals to this group - await this.createTerminal({ config: { attachPersistentProcess: terminalLayout.terminal! }, location: { parentTerminal: terminalInstance } }); + terminalInstance = await this.createTerminal({ config: { attachPersistentProcess: terminalLayout.terminal! }, location: { parentTerminal: terminalInstance } }); } } const activeInstance = this.instances.find(t => { @@ -1371,10 +1371,6 @@ export class TerminalService implements ITerminalService { } private _getSplitParent(location?: ITerminalLocationOptions): ITerminalInstance | undefined { - if (this._connectionState === TerminalConnectionState.Connecting && this.activeInstance) { - const group = this._terminalGroupService.getGroupForInstance(this.activeInstance); - return group?.terminalInstances[group.terminalInstances.length - 1]; - } if (location && typeof location === 'object' && 'parentTerminal' in location) { return location.parentTerminal; } else if (location && typeof location === 'object' && 'splitActiveTerminal' in location) {