From cb77b9dc1a07ae4549d09da4c81307c1fd1201cb Mon Sep 17 00:00:00 2001 From: Lucian Buzzo Date: Sun, 19 Mar 2017 08:26:37 +0000 Subject: [PATCH] Prevent line data from being discarded on resize. --- src/xterm.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/xterm.js b/src/xterm.js index 37c00ed852..830b8f846a 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -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);