Преглед на файлове

Clear cells in notebook handler

Jeremy Tuloup преди 5 години
родител
ревизия
34b4c7de4d
променени са 1 файла, в които са добавени 5 реда и са изтрити 4 реда
  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