From 5fd21aed8f97c7e54f99e7613e25cad2a6822af7 Mon Sep 17 00:00:00 2001 From: Renan Rodrigues dos Santos Date: Sat, 13 Sep 2025 17:10:57 -0300 Subject: [PATCH] Fix activation icon state when using `shellStartup` --- src/features/terminal/terminalManager.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/features/terminal/terminalManager.ts b/src/features/terminal/terminalManager.ts index a985c079..09a9c4fa 100644 --- a/src/features/terminal/terminalManager.ts +++ b/src/features/terminal/terminalManager.ts @@ -252,6 +252,12 @@ export class TerminalManagerImpl implements TerminalManager { traceInfo( `"python-envs.terminal.autoActivationType" is set to "${actType}", terminal should be activated by shell startup script`, ); + // If the shell is already set up (shellSetup.get(...) === true) then we can safely mark it activated so + // that the UI button shows the correct Deactivate option. + let isSetup = this.shellSetup.get(shellType); + if (isSetup && isActivatableEnvironment(environment) && !this.isActivated(terminal, environment)) { + this.ta.updateActivationState(terminal, environment, true); + } } }