]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Polish
authorDaniel Imms <daimms@microsoft.com>
Sat, 24 Dec 2016 11:17:30 +0000 (03:17 -0800)
committerDaniel Imms <daimms@microsoft.com>
Sat, 24 Dec 2016 11:17:30 +0000 (03:17 -0800)
src/utils/CircularList.ts
src/xterm.js

index a84a98eba67204f5956c1a49dde8747ef9504388..8835acb01c20ef7bde79f6f16c8efc780e90da1b 100644 (file)
@@ -38,7 +38,6 @@ export class CircularList<T> {
   }
 
   public set length(newLength: number) {
-    // TODO: Is this auto fill is needed or can it be
     if (newLength > this._length) {
       for (let i = this._length; i < newLength; i++) {
         this._array[i] = undefined;
index 8ede46ed779a0c030ee246d2d619d571aeec0735..a475b75f878357806929037662a1f1d5f538884f 100644 (file)
@@ -3706,6 +3706,7 @@ Terminal.prototype.insertLines = function(params) {
 
   while (param--) {
     if (this.lines.length === this.lines.maxLength) {
+      // Trim the start of lines to make room for the new line
       this.lines.trimStart(1);
       this.ybase--;
       this.ydisp--;
@@ -3740,9 +3741,7 @@ Terminal.prototype.deleteLines = function(params) {
 
   while (param--) {
     if (this.lines.length === this.lines.maxLength) {
-      // Trim the start of lines to make room for the new temporary row
-      // TODO: This section could be optimized by introducing a CircularList function that inserts,
-      //       deletes and shifts elements to accomplish this task.
+      // Trim the start of lines to make room for the new line
       this.lines.trimStart(1);
       this.ybase -= 1;
       this.ydisp -= 1;