From 6f6e3ad838bfc38d35766c47717387d7e66fd2b9 Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Sun, 26 Sep 2021 23:28:54 +0200 Subject: [PATCH] Fix bug with terminal-initiated connections --- CHANGELOG.md | 1 + src/manager.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6495f57..0ed6036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes - Fix remote `code` command (#267) not working without the filesystem already connected (#292) +- Fix bug with broken connections when connections are initiated by spawning named terminals ### Changes - Proxy hop field now actually lists all known configs to pick from, instead of "TO DO" (#290) diff --git a/src/manager.ts b/src/manager.ts index 6345a82..1b794ea 100644 --- a/src/manager.ts +++ b/src/manager.ts @@ -114,7 +114,7 @@ export class Manager implements vscode.TaskProvider, vscode.TerminalLinkProvider public async createTerminal(name: string, config?: FileSystemConfig | Connection, uri?: vscode.Uri): Promise { const { createTerminal } = await import('./pseudoTerminal'); // Create connection (early so we have .actualConfig.root) - const con = (config && 'client' in config) ? config : await this.connectionManager.createConnection(name, config); + const con = (config && 'client' in config) ? config : await this.connectionManager.createConnection(config?.name || name, config); // Create pseudo terminal this.connectionManager.update(con, con => con.pendingUserCount++); const pty = await createTerminal({ connection: con, workingDirectory: uri?.path || con.actualConfig.root });