Ver Fonte

Clear cells in notebook handler

Jeremy Tuloup há 5 anos atrás
pai
commit
34b4c7de4d
1 ficheiros alterados com 5 adições e 4 exclusões
  1. 5 4
      src/handlers/notebook.ts

+ 5 - 4
src/handlers/notebook.ts

@@ -72,16 +72,17 @@ export class NotebookHandler implements IDisposable {
   }
 
   private showCurrentLine(frame: Callstack.IFrame) {
-    if (!frame) {
-      return;
-    }
-
     const notebook = this.notebookTracker.currentWidget;
     if (!notebook) {
       return;
     }
 
     const cells = notebook.content.widgets;
+    cells.forEach(cell => CellManager.cleanupHighlight(cell));
+
+    if (!frame) {
+      return;
+    }
 
     cells.forEach(cell => {
       // check the event is for the correct cell