Skip to content

Commit

Permalink
Add example for window.onDidCloseTerminal
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Sep 15, 2016
1 parent 94cd47f commit 3c9dd39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions terminal-example/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 3c9dd39

Please sign in to comment.