Don't refresh terminal when scrollDisp doesn't scroll

Fixes #765
This commit is contained in:
Daniel Imms
2017-07-06 21:16:20 -07:00
parent 479fb0e782
commit 85c892c218
+5 -5
View File
@@ -1237,12 +1237,12 @@ Terminal.prototype.scrollDisp = function(disp, suppressScrollEvent) {
this.userScrolling = false;
}
this.ydisp += disp;
const oldYdisp = this.ydisp;
this.ydisp = Math.max(Math.min(this.ydisp + disp, this.ybase), 0);
if (this.ydisp > this.ybase) {
this.ydisp = this.ybase;
} else if (this.ydisp < 0) {
this.ydisp = 0;
// No change occurred, don't trigger scroll/refresh
if (oldYdisp === this.ydisp) {
return;
}
if (!suppressScrollEvent) {