in src/integratedShell.ts [103:109]
protected initShellInternal() { vscode.window.onDidCloseTerminal((terminal) => { if (terminal === this.terminal) { this.dispose(); } }); }