Pārlūkot izejas kodu

Clean console history.

Afshin Darian 8 gadi atpakaļ
vecāks
revīzija
63651c65aa
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      src/console/history.ts

+ 3 - 3
src/console/history.ts

@@ -97,7 +97,7 @@ class ConsoleHistory implements IConsoleHistory {
       return;
     }
 
-    this._kernel.history(Private.initialRequest).then(v => this._populate(v));
+    this._kernel.history(Private.initialRequest).then(v => this.onHistory(v));
   }
 
   /**
@@ -155,7 +155,7 @@ class ConsoleHistory implements IConsoleHistory {
   }
 
   /**
-   * Populate the history collection.
+   * Populate the history collection on history reply from a kernel.
    *
    * @param value The kernel message history reply.
    *
@@ -164,7 +164,7 @@ class ConsoleHistory implements IConsoleHistory {
    * [session: number, line: number, input: string]
    * Contiguous duplicates are stripped out of the API response.
    */
-  private _populate(value: KernelMessage.IHistoryReplyMsg): void {
+  protected onHistory(value: KernelMessage.IHistoryReplyMsg): void {
     this._history = [];
     let last = '';
     let current = '';