Add example for window.onDidCloseTerminal

Part of Microsoft/vscode#10925
This commit is contained in:
Daniel Imms
2016-09-15 12:25:32 -07:00
parent 94cd47f3c1
commit 3c9dd393d4

View File

@ -52,6 +52,9 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.commands.registerCommand('terminalTest.createZshLoginShell', () => {
terminalStack.push((<any>vscode.window).createTerminal(`Ext Terminal #${terminalStack.length + 1}`, '/bin/zsh', ['-l']));
}));
(<any>vscode.window).onDidCloseTerminal((terminal) => {
console.log('Terminal closed', terminal);
});
function getLatestTerminal() {
return terminalStack[terminalStack.length - 1];