Skip to content

Commit 5fd21ae

Browse files
Fix activation icon state when using shellStartup
1 parent e8d2670 commit 5fd21ae

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/features/terminal/terminalManager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ export class TerminalManagerImpl implements TerminalManager {
252252
traceInfo(
253253
`"python-envs.terminal.autoActivationType" is set to "${actType}", terminal should be activated by shell startup script`,
254254
);
255+
// If the shell is already set up (shellSetup.get(...) === true) then we can safely mark it activated so
256+
// that the UI button shows the correct Deactivate option.
257+
let isSetup = this.shellSetup.get(shellType);
258+
if (isSetup && isActivatableEnvironment(environment) && !this.isActivated(terminal, environment)) {
259+
this.ta.updateActivationState(terminal, environment, true);
260+
}
255261
}
256262
}
257263

0 commit comments

Comments
 (0)