From 939fb215ad61288848c7ea279e3f4c2888cf5f00 Mon Sep 17 00:00:00 2001 From: zhanba Date: Thu, 8 Aug 2024 17:34:55 +0800 Subject: [PATCH] fix: set cwd when terminal recovery (#3923) --- packages/terminal-next/src/browser/terminal.client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/terminal-next/src/browser/terminal.client.ts b/packages/terminal-next/src/browser/terminal.client.ts index 5383ee2e4e..2a76a87f22 100644 --- a/packages/terminal-next/src/browser/terminal.client.ts +++ b/packages/terminal-next/src/browser/terminal.client.ts @@ -507,7 +507,7 @@ export class TerminalClient extends Disposable implements ITerminalClient { } private async _pickWorkspace() { - if (this.workspace.isMultiRootWorkspaceOpened) { + if (this.workspace.isMultiRootWorkspaceOpened && !this._widget.recovery) { // 工作区模式下每次新建终端都需要用户手动进行一次路径选择 const roots = this.workspace.tryGetRoots(); const choose = await this.quickPick.show( @@ -533,7 +533,7 @@ export class TerminalClient extends Disposable implements ITerminalClient { const widget = this._widget; if (TerminalClient.WORKSPACE_PATH_CACHED.has(widget.group.id)) { this._workspacePath = TerminalClient.WORKSPACE_PATH_CACHED.get(widget.group.id)!; - } else if (!widget.recovery) { + } else { const choose = await this._pickWorkspace(); if (choose) { this._workspacePath = choose;