Merge pull request #50 from blink1073/fix-resize

Use shift() when reducing lines to preserve lines up to cursor
This commit is contained in:
Paris Kasidiaris
2016-04-20 18:36:38 +03:00
+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);
}