Skip to content

Commit 28ae1e0

Browse files
committed
Fire end in microtask
1 parent 762cbd6 commit 28ae1e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ export class MainThreadTerminalShellIntegration extends Disposable implements Ma
6969
currentCommand = undefined;
7070
const instanceId = e.instance.instanceId;
7171
instanceDataListeners.get(instanceId)?.dispose();
72-
this._proxy.$shellExecutionEnd(instanceId, e.data.command, convertToExtHostCommandLineConfidence(e.data), e.data.isTrusted, e.data.exitCode);
72+
// Send end in a microtask to ensure the data events are sent first
73+
queueMicrotask(() => {
74+
this._proxy.$shellExecutionEnd(instanceId, e.data.command, convertToExtHostCommandLineConfidence(e.data), e.data.isTrusted, e.data.exitCode);
75+
});
7376
}));
7477

7578
// onDidChangeTerminalShellIntegration via cwd

0 commit comments

Comments
 (0)