Merge remote-tracking branch 'upstream/master' into 425_xon_xoff_on_280
This commit is contained in:
+9
-7
@@ -1297,6 +1297,15 @@ Terminal.prototype.showCursor = function() {
|
|||||||
Terminal.prototype.scroll = function() {
|
Terminal.prototype.scroll = function() {
|
||||||
var row;
|
var row;
|
||||||
|
|
||||||
|
// Make room for the new row in lines
|
||||||
|
if (this.lines.length === this.lines.maxLength) {
|
||||||
|
this.lines.trimStart(1);
|
||||||
|
this.ybase--;
|
||||||
|
if (this.ydisp !== 0) {
|
||||||
|
this.ydisp--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.ybase++;
|
this.ybase++;
|
||||||
|
|
||||||
// TODO: Why is this done twice?
|
// TODO: Why is this done twice?
|
||||||
@@ -1311,13 +1320,6 @@ Terminal.prototype.scroll = function() {
|
|||||||
row -= this.rows - 1 - this.scrollBottom;
|
row -= this.rows - 1 - this.scrollBottom;
|
||||||
|
|
||||||
if (row === this.lines.length) {
|
if (row === this.lines.length) {
|
||||||
// Compensate ybase and ydisp if lines has hit the maximum buffer size
|
|
||||||
if (this.lines.length === this.lines.maxLength) {
|
|
||||||
this.ybase--;
|
|
||||||
if (this.ydisp !== 0) {
|
|
||||||
this.ydisp--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Optimization: pushing is faster than splicing when they amount to the same behavior
|
// Optimization: pushing is faster than splicing when they amount to the same behavior
|
||||||
this.lines.push(this.blankLine());
|
this.lines.push(this.blankLine());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user