diff --git a/src/SelectionManager.ts b/src/SelectionManager.ts index 47089aa0..5e196f7b 100644 --- a/src/SelectionManager.ts +++ b/src/SelectionManager.ts @@ -238,6 +238,7 @@ export class SelectionManager extends EventEmitter { * @param event The mouseup event. */ private _onMouseUp(event: MouseEvent) { + this._dragScrollAmount = 0; if (!this._selectionStart) { return; } diff --git a/src/xterm.js b/src/xterm.js index f16c7ea0..1680e551 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -1178,6 +1178,9 @@ Terminal.prototype.scroll = function() { */ Terminal.prototype.scrollDisp = function(disp, suppressScrollEvent) { if (disp < 0) { + if (this.ydisp === 0) { + return; + } this.userScrolling = true; } else if (disp + this.ydisp >= this.ybase) { this.userScrolling = false;