Skip to content

Commit

Permalink
Fire end in microtask
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Apr 16, 2024
1 parent 762cbd6 commit 28ae1e0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ export class MainThreadTerminalShellIntegration extends Disposable implements Ma
currentCommand = undefined;
const instanceId = e.instance.instanceId;
instanceDataListeners.get(instanceId)?.dispose();
this._proxy.$shellExecutionEnd(instanceId, e.data.command, convertToExtHostCommandLineConfidence(e.data), e.data.isTrusted, e.data.exitCode);
// Send end in a microtask to ensure the data events are sent first
queueMicrotask(() => {
this._proxy.$shellExecutionEnd(instanceId, e.data.command, convertToExtHostCommandLineConfidence(e.data), e.data.isTrusted, e.data.exitCode);
});
}));

// onDidChangeTerminalShellIntegration via cwd
Expand Down

0 comments on commit 28ae1e0

Please sign in to comment.