Cover a case when resizing smaller making y go out of bounds
This commit is contained in:
+1
-1
@@ -360,7 +360,7 @@ export class Buffer implements IBuffer {
|
|||||||
let viewportAdjustments = linesToAdd - trimmedLines;
|
let viewportAdjustments = linesToAdd - trimmedLines;
|
||||||
while (viewportAdjustments-- > 0) {
|
while (viewportAdjustments-- > 0) {
|
||||||
if (this.ybase === 0) {
|
if (this.ybase === 0) {
|
||||||
if (this.y < this._rows - 1) {
|
if (this.y < newRows - 1) {
|
||||||
this.y++;
|
this.y++;
|
||||||
this.lines.pop();
|
this.lines.pop();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user