1 parent f333df5 commit acde1bcCopy full SHA for acde1bc
1 file changed
packages/vscode/src/extension.ts
@@ -34,7 +34,7 @@ export async function activate(context: vscode.ExtensionContext) {
34
35
const disposable = vscode.commands.registerCommand(COMMAND_LAUNCH, async () => {
36
try {
37
- console.debug("current Panel = ", currentPanel);
+ console.debug("current Panel = ", currentPanel, currentPanel?.onDidDispose);
38
if (currentPanel) {
39
currentPanel.reveal();
40
return;
@@ -97,6 +97,14 @@ export async function activate(context: vscode.ExtensionContext) {
97
});
98
currentPanel = webLoader.getPanel();
99
100
+ currentPanel?.onDidDispose(
101
+ () => {
102
+ currentPanel = undefined;
103
+ },
104
+ null,
105
+ context.subscriptions
106
+ );
107
+
108
subscriptions.push(webLoader);
109
vscode.window.showInformationMessage("Hello Githru");
110
} catch (error) {
0 commit comments