Skip to content
Prev Previous commit
Next Next commit
Make sure close and reopen works
  • Loading branch information
rchiodo committed Apr 13, 2020
commit d17058b7596404ec284b123762b7972d8238b286
8 changes: 7 additions & 1 deletion src/client/datascience/editor-integration/codeLensFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,14 @@ export class CodeLensFactory implements ICodeLensFactory, IInteractiveWindowList
break;

case InteractiveWindowMessages.NotebookClose:
if (payload.resource === this.interactiveIdentity) {
if (payload.resource.toString() === this.interactiveIdentity?.toString()) {
this.codeLensCache.clear();
this.interactiveIdentity = undefined;
this.hashProvider = undefined;
this.documentExecutionCounts.clear();

// Clear out any goto cell code lenses.
this.updateEvent.fire();
}
break;
case InteractiveWindowMessages.NotebookExecutionActivated:
Expand Down