From b3b2bd1faf4031b57debc2d8d3481073094a5a1e Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 09:51:13 -0700 Subject: [PATCH] Don't flag user scrolling if no scrolling happens --- src/SelectionManager.ts | 1 + src/xterm.js | 3 +++ 2 files changed, 4 insertions(+) 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;