Skip to content

Commit 9ae8e83

Browse files
Fix activation icon state when using shellStartup (#837)
Fixes #765
1 parent bf8f5ec commit 9ae8e83

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
@@ -268,6 +268,12 @@ export class TerminalManagerImpl implements TerminalManager {
268268
traceInfo(
269269
`"python-envs.terminal.autoActivationType" is set to "${actType}", terminal should be activated by shell startup script`,
270270
);
271+
// If the shell is already set up (shellSetup.get(...) === true) then we can safely mark it activated so
272+
// that the UI button shows the correct Deactivate option.
273+
let isSetup = this.shellSetup.get(shellType);
274+
if (isSetup && isActivatableEnvironment(environment) && !this.isActivated(terminal, environment)) {
275+
this.ta.updateActivationState(terminal, environment, true);
276+
}
271277
}
272278
}
273279

0 commit comments

Comments
 (0)