Bound refresh max rows to this.rows not this.lines

this.row is the size of rows in the viewport, this.lines is the buffer. It's
only possible to refresh `0` to `this.rows - 1`.

Fixes #86
This commit is contained in:
Daniel Imms
2016-06-10 13:08:43 -07:00
parent 7c1559b8ad
commit edf897182e
+2 -2
View File
@@ -1135,9 +1135,9 @@
width = this.cols;
y = start;
if (end >= this.lines.length) {
if (end >= this.rows.length) {
this.log('`end` is too large. Most likely a bad CSR.');
end = this.lines.length - 1;
end = this.rows.length - 1;
}
for (; y <= end; y++) {