Skip to content

Commit 829a815

Browse files
committed
reuse window when possible
1 parent 9b4108d commit 829a815

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/remoteConnector.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,8 @@ export class RemoteConnector extends Disposable {
797797

798798
await this.context.globalState.update(`${SSH_DEST_KEY}${sshDestination!.toRemoteSSHString()}`, { ...params } as SSHConnectionParams);
799799

800-
const forceNewWindow = this.context.extensionMode === vscode.ExtensionMode.Production;
800+
const forceNewWindow = this.context.extensionMode === vscode.ExtensionMode.Production
801+
&& (!!vscode.env.remoteName || !!vscode.workspace.workspaceFile || !!vscode.workspace.workspaceFolders || !!vscode.window.visibleTextEditors.length || !!vscode.window.visibleNotebookEditors.length);
801802

802803
// Force Linux as host platform (https://github.com/gitpod-io/gitpod/issues/16058)
803804
if (isWindows) {

0 commit comments

Comments
 (0)