Skip to content

Commit

Permalink
Merge pull request #616 from LucianBuzzo/crop-lines
Browse files Browse the repository at this point in the history
Prevent line data from being discarded on resize.
  • Loading branch information
parisk authored Mar 20, 2017
2 parents 0723dac + cb77b9d commit 045f361
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1805,14 +1805,8 @@ Terminal.prototype.resize = function(x, y) {
this.lines.get(i).push(ch);
}
}
} else { // (j > x)
i = this.lines.length;
while (i--) {
while (this.lines.get(i).length > x) {
this.lines.get(i).pop();
}
}
}

this.cols = x;
this.setupStops(this.cols);

Expand Down

0 comments on commit 045f361

Please sign in to comment.