提交 37d7baa7 编写于 作者: A Alex Ross

Fix the saved last task on reused terminals

Part of #68077
上级 ab27e125
......@@ -884,7 +884,7 @@ export class TerminalTaskSystem implements ITaskSystem {
// (or, if the task has no group, a terminal used by a task without group).
for (const taskId of this.idleTaskTerminals.keys()) {
const idleTerminalId = this.idleTaskTerminals.get(taskId)!;
if (this.terminals[idleTerminalId].group === group) {
if (idleTerminalId && this.terminals[idleTerminalId].group === group) {
terminalId = this.idleTaskTerminals.remove(taskId);
break;
}
......@@ -899,6 +899,7 @@ export class TerminalTaskSystem implements ITaskSystem {
if (task.command.presentation && task.command.presentation.clear) {
terminalToReuse.terminal.clear();
}
this.terminals[terminalToReuse.terminal.id.toString()].lastTask = taskKey;
return [terminalToReuse.terminal, commandExecutable, undefined];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册