tweak proposed shouldPersist API

This commit is contained in:
Megan Rogge
2021-12-10 14:58:34 -08:00
parent e1c0b0dd25
commit bb6f6df974
2 changed files with 2 additions and 2 deletions
@@ -550,7 +550,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
get persistentProcessId(): number | undefined { return this._processManager.persistentProcessId; }
get shouldPersist(): boolean { return this._processManager.shouldPersist && !this.shellLaunchConfig.disablePersistence; }
get shouldPersist(): boolean { return this._processManager.shouldPersist; }
/**
* Create xterm.js instance and attach data listeners.
@@ -223,7 +223,7 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
// this is a copy of what the merged environment collection is on the remote side
await this._setupEnvVariableInfo(backend, variableResolver, shellLaunchConfig);
const shouldPersist = !shellLaunchConfig.isFeatureTerminal && this._configHelper.config.enablePersistentSessions;
const shouldPersist = !shellLaunchConfig.isFeatureTerminal && this._configHelper.config.enablePersistentSessions && !shellLaunchConfig.disablePersistence;
if (shellLaunchConfig.attachPersistentProcess) {
const result = await backend.attachToProcess(shellLaunchConfig.attachPersistentProcess.id);
if (result) {