mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #429 from Tyriar/428_scrollback_exception
Ensure ydisp does not drop below 0 in refresh
This commit is contained in:
+3
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user