瀏覽代碼

Rename cleanupHighlight to clearHighlight

* For consistency
Jeremy Tuloup 5 年之前
父節點
當前提交
42d0ad1efd
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 4 4
      src/handlers/cell.ts
  2. 2 2
      src/handlers/notebook.ts

+ 4 - 4
src/handlers/cell.ts

@@ -47,7 +47,7 @@ export class CellManager implements IDisposable {
 
     this._debuggerModel.callstackModel.currentFrameChanged.connect(
       (_, frame) => {
-        CellManager.cleanupHighlight(this.activeCell);
+        CellManager.clearHighlight(this.activeCell);
         if (!frame) {
           return;
         }
@@ -84,7 +84,7 @@ export class CellManager implements IDisposable {
     if (this._cellMonitor) {
       this._cellMonitor.dispose();
     }
-    CellManager.cleanupHighlight(this.activeCell);
+    CellManager.clearHighlight(this.activeCell);
     Signal.clearData(this);
     this.isDisposed = true;
   }
@@ -287,7 +287,7 @@ export namespace CellManager {
    */
   export function showCurrentLine(cell: Cell, frame: Callstack.IFrame) {
     const editor = cell.editor as CodeMirrorEditor;
-    cleanupHighlight(cell);
+    clearHighlight(cell);
     editor.editor.addLineClass(frame.line - 1, 'wrap', LINE_HIGHLIGHT_CLASS);
   }
 
@@ -295,7 +295,7 @@ export namespace CellManager {
    * Remove all line highlighting indicators for the given cell.
    * @param cell The cell to cleanup.
    */
-  export function cleanupHighlight(cell: Cell) {
+  export function clearHighlight(cell: Cell) {
     if (!cell || cell.isDisposed || !cell.inputArea) {
       return;
     }

+ 2 - 2
src/handlers/notebook.ts

@@ -67,7 +67,7 @@ export class NotebookHandler implements IDisposable {
   protected cleanAllCells() {
     const cells = this.notebookPanel.content.widgets;
     cells.forEach(cell => {
-      CellManager.cleanupHighlight(cell);
+      CellManager.clearHighlight(cell);
       CellManager.clearGutter(cell);
     });
   }
@@ -92,7 +92,7 @@ export class NotebookHandler implements IDisposable {
     }
 
     const cells = notebook.content.widgets;
-    cells.forEach(cell => CellManager.cleanupHighlight(cell));
+    cells.forEach(cell => CellManager.clearHighlight(cell));
 
     if (!frame) {
       return;