From d9133f70cbe22214666b2239429f73d2bf0b07c9 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Thu, 8 Aug 2024 11:20:48 -0400 Subject: [PATCH] Slight tweak, plus add more commentary --- .../positronConsole/browser/positronConsoleService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/positronConsole/browser/positronConsoleService.ts b/src/vs/workbench/services/positronConsole/browser/positronConsoleService.ts index cbd9888a242..8dbe8ab0d78 100644 --- a/src/vs/workbench/services/positronConsole/browser/positronConsoleService.ts +++ b/src/vs/workbench/services/positronConsole/browser/positronConsoleService.ts @@ -1940,7 +1940,9 @@ class PositronConsoleInstance extends Disposable implements IPositronConsoleInst this._pendingInputState = 'Processing'; try { - return await this.processPendingInputImpl(); + // Need to `await` inside the `try` so that the `finally` only runs once + // `processPendingInputImpl()` has completely finished. Can't just return the promise. + await this.processPendingInputImpl(); } finally { this._pendingInputState = 'Idle'; }