Skip to content

Commit

Permalink
Prevent line data from being discarded on resize.
Browse files Browse the repository at this point in the history
  • Loading branch information
LucianBuzzo committed Mar 19, 2017
1 parent 0723dac commit cb77b9d
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 cb77b9d

Please sign in to comment.