This commit is contained in:
Daniel Imms
2016-12-24 03:17:30 -08:00
parent cc5ae8193b
commit d7f2ec89d7
2 changed files with 2 additions and 4 deletions
-1
View 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;
+2 -3
View 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;