Skip to content

Commit

Permalink
Merge pull request #50 from blink1073/fix-resize
Browse files Browse the repository at this point in the history
Use shift() when reducing lines to preserve lines up to cursor
  • Loading branch information
parisk committed Apr 20, 2016
2 parents a54eb8a + 685bc54 commit ad3764a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ad3764a

Please sign in to comment.