Cover a case when resizing smaller making y go out of bounds

This commit is contained in:
Daniel Imms
2019-02-08 12:13:00 -08:00
parent b88230db8b
commit d17dfbc73f
+1 -1
View File
@@ -360,7 +360,7 @@ export class Buffer implements IBuffer {
let viewportAdjustments = linesToAdd - trimmedLines;
while (viewportAdjustments-- > 0) {
if (this.ybase === 0) {
if (this.y < this._rows - 1) {
if (this.y < newRows - 1) {
this.y++;
this.lines.pop();
} else {