File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export async function activate(context: vscode.ExtensionContext) {
34
34
35
35
const disposable = vscode . commands . registerCommand ( COMMAND_LAUNCH , async ( ) => {
36
36
try {
37
- console . debug ( "current Panel = " , currentPanel ) ;
37
+ console . debug ( "current Panel = " , currentPanel , currentPanel ?. onDidDispose ) ;
38
38
if ( currentPanel ) {
39
39
currentPanel . reveal ( ) ;
40
40
return ;
@@ -97,6 +97,14 @@ export async function activate(context: vscode.ExtensionContext) {
97
97
} ) ;
98
98
currentPanel = webLoader . getPanel ( ) ;
99
99
100
+ currentPanel ?. onDidDispose (
101
+ ( ) => {
102
+ currentPanel = undefined ;
103
+ } ,
104
+ null ,
105
+ context . subscriptions
106
+ ) ;
107
+
100
108
subscriptions . push ( webLoader ) ;
101
109
vscode . window . showInformationMessage ( "Hello Githru" ) ;
102
110
} catch ( error ) {
You can’t perform that action at this time.
0 commit comments