Skip to content

Commit 50e34c9

Browse files
committed
Only persist terminals when they have had interaction
Fixes microsoft#158595
1 parent 866bddc commit 50e34c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/platform/terminal/node/ptyService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,9 @@ export class PersistentTerminalProcess extends Disposable {
597597

598598
async detach(): Promise<void> {
599599
this._logService.trace('persistentTerminalProcess#detach', this._persistentProcessId);
600-
if (this.shouldPersistTerminal) {
600+
// Keep the process around if it was indicated to persist and it has had some iteraction or
601+
// was replayed
602+
if (this.shouldPersistTerminal && this._interactionState !== InteractionState.None) {
601603
this._disconnectRunner1.schedule();
602604
} else {
603605
this.shutdown(true);

0 commit comments

Comments
 (0)