diff --git a/src/xterm.js b/src/xterm.js index a475b75f..69bbc73a 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -1251,7 +1251,9 @@ Terminal.prototype.scroll = function() { // Compensate ybase and ydisp if lines has hit the maximum buffer size if (this.lines.length === this.lines.maxLength) { this.ybase--; - this.ydisp--; + if (this.ydisp !== 0) { + this.ydisp--; + } } // Optimization: pushing is faster than splicing when they amount to the same behavior this.lines.push(this.blankLine());