Fix clear function when buffer is <= rows

This commit is contained in:
Daniel Imms
2016-09-17 04:07:36 -07:00
parent 852dac4d62
commit 26fc53990b
2 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -3062,10 +3062,10 @@ Terminal.prototype.clear = function() {
// Don't clear if it's already clear
return;
}
this.lines = [this.lines[this.ybase + this.y]];
this.ydisp = 0;
this.ybase = 0;
this.y = 0;
this.lines = [this.lines[this.lines.length - 1]];
for (var i = 1; i < this.rows; i++) {
this.lines.push(this.blankLine());
}