From aca94a0d497aee01e11ea520e00de4f409371f86 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 9 Apr 2018 10:55:23 -0700 Subject: [PATCH] Show info boxes for events --- terminal-sample/src/extension.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/terminal-sample/src/extension.ts b/terminal-sample/src/extension.ts index a528a78a..c7e742b0 100644 --- a/terminal-sample/src/extension.ts +++ b/terminal-sample/src/extension.ts @@ -57,7 +57,14 @@ export function activate(context: vscode.ExtensionContext) { console.log(`Shell process ID: ${processId}`); }); })); - vscode.window.onDidCloseTerminal((terminal) => console.log('Terminal closed', terminal)); + vscode.window.onDidCloseTerminal((terminal) => { + vscode.window.showInformationMessage(`onDidCloseTerminal, name: ${terminal.name}`); + }); + + // Proposed APIs + (vscode.window).onDidOpenTerminal((terminal: vscode.Terminal) => { + vscode.window.showInformationMessage(`onDidOpenTerminal, name: ${terminal.name}`); + }); function getLatestTerminal() { return terminalStack[terminalStack.length - 1];