This commit is contained in:
Megan Rogge 2021-11-30 12:33:52 -08:00
parent faf6f0e1fd
commit afd6cf4377
No known key found for this signature in database
GPG key ID: 69182D7934F25879

View file

@ -1599,7 +1599,7 @@ export function registerTerminalActions() {
const themeService = accessor.get(IThemeService);
const groupService = accessor.get(ITerminalGroupService);
const picks: ITerminalQuickPickItem[] = [];
if (!groupService.activeInstance || groupService.instances.length === 1) {
if (groupService.instances.length === 1) {
return;
}
const otherInstances = groupService.instances.filter(i => i.instanceId !== groupService.activeInstance?.instanceId);
@ -1624,6 +1624,9 @@ export function registerTerminalActions() {
});
}
}
if (picks.length === 0) {
return;
}
const result = await accessor.get(IQuickInputService).pick(picks, {});
if (result) {
groupService.joinInstances([result.terminal, groupService.activeInstance!]);