Skip to content

Commit

Permalink
use common task ID instead of map key (#159233)
Browse files Browse the repository at this point in the history
* fix #158886

* Update src/vs/workbench/contrib/terminal/test/browser/links/terminalLocalLinkDetector.test.ts
  • Loading branch information
meganrogge authored Aug 26, 2022
1 parent 0a7b686 commit 35b971c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
for (let i = 0; i < this._reconnectedTerminals.length; i++) {
const terminal = this._reconnectedTerminals[i];
const taskForTerminal = terminal.shellLaunchConfig.attachPersistentProcess?.reconnectionProperties?.data as IReconnectionTaskData;
if (taskForTerminal.lastTask === task.getMapKey()) {
if (taskForTerminal.lastTask === task.getCommonTaskId()) {
this._reconnectedTerminals.splice(i, 1);
return terminal;
}
Expand Down Expand Up @@ -1455,7 +1455,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {

this._terminalCreationQueue = this._terminalCreationQueue.then(() => this._doCreateTerminal(task, group, launchConfigs!));
const terminal: ITerminalInstance = (await this._terminalCreationQueue)!;
terminal.shellLaunchConfig.reconnectionProperties = { ownerId: ReconnectionType, data: { lastTask: taskKey, group, label: task._label, id: task._id } };
terminal.shellLaunchConfig.reconnectionProperties = { ownerId: ReconnectionType, data: { lastTask: task.getCommonTaskId(), group, label: task._label, id: task._id } };
const terminalKey = terminal.instanceId.toString();
const terminalData = { terminal: terminal, lastTask: taskKey, group };
terminal.onDisposed(() => this._deleteTaskAndTerminal(terminal, terminalData));
Expand Down

0 comments on commit 35b971c

Please sign in to comment.