mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
+5
-5
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user