mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fix restored terminal splits not being visible or registering listeners
Fixes #44617
This commit is contained in:
parent
0eabb57072
commit
63ceb0bdeb
|
@ -94,9 +94,8 @@ export abstract class TerminalService implements ITerminalService {
|
|||
|
||||
tabConfigs.forEach(tabConfig => {
|
||||
const instance = this.createInstance(tabConfig.instances[0]);
|
||||
const tab = this._getTabForInstance(instance);
|
||||
for (let i = 1; i < tabConfig.instances.length; i++) {
|
||||
tab.split(this._terminalFocusContextKey, this.configHelper, tabConfig.instances[i]);
|
||||
this.splitInstance(instance, tabConfig.instances[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -271,13 +270,13 @@ export abstract class TerminalService implements ITerminalService {
|
|||
this.setActiveTabByIndex(newIndex);
|
||||
}
|
||||
|
||||
public splitInstance(instanceToSplit: ITerminalInstance): void {
|
||||
public splitInstance(instanceToSplit: ITerminalInstance, shellLaunchConfig: IShellLaunchConfig = {}): void {
|
||||
const tab = this._getTabForInstance(instanceToSplit);
|
||||
if (!tab) {
|
||||
return;
|
||||
}
|
||||
|
||||
const instance = tab.split(this._terminalFocusContextKey, this.configHelper, {});
|
||||
const instance = tab.split(this._terminalFocusContextKey, this.configHelper, shellLaunchConfig);
|
||||
this._initInstanceListeners(instance);
|
||||
this._onInstancesChanged.fire();
|
||||
|
||||
|
|
Loading…
Reference in a new issue