Use shift to reduce lines to preserve lines up to cursor

This commit is contained in:
Steven Silvester
2016-04-14 06:35:44 -05:00
parent a54eb8ac44
commit 685bc54bf2
+2 -2
View File
@@ -2520,10 +2520,10 @@
} else if (j > y) {
while (j-- > y) {
if (this.lines.length > y + this.ybase) {
this.lines.pop();
this.lines.shift();
}
if (this.children.length > y) {
el = this.children.pop();
el = this.children.shift();
if (!el) continue;
el.parentNode.removeChild(el);
}