From bcb4e5298b64cb9bdd67f1841460d516a446d186 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 27 May 2026 18:16:54 +0000 Subject: [PATCH] Fix duplicate buildNumber guard in Windows ConPTY logic The windowsPty option change handler checked buildNumber twice instead of requiring both backend and buildNumber to be defined. This aligns with Buffer.ts and ensures ConPTY wrapping heuristics are evaluated only when both fields are present. Fixes #5934 Co-authored-by: Daniel Imms --- src/common/CoreTerminal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/CoreTerminal.ts b/src/common/CoreTerminal.ts index 9bd7faaf5..80168aa65 100644 --- a/src/common/CoreTerminal.ts +++ b/src/common/CoreTerminal.ts @@ -263,7 +263,7 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal { private _handleWindowsPtyOptionChange(): void { let value = false; const windowsPty = this.optionsService.rawOptions.windowsPty; - if (windowsPty && windowsPty.buildNumber !== undefined && windowsPty.buildNumber !== undefined) { + if (windowsPty && windowsPty.backend !== undefined && windowsPty.buildNumber !== undefined) { value = !!(windowsPty.backend === 'conpty' && windowsPty.buildNumber < 21376); } if (value) {