From 2f6d05f99da48acfc490e4137bc216c04c388d35 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 19 May 2017 23:32:26 -0700 Subject: [PATCH] Handle scrolling of selection --- src/xterm.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/xterm.js b/src/xterm.js index e75d90e9..1749e158 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -699,10 +699,8 @@ Terminal.prototype.open = function(parent, focus) { this.renderer = new Renderer(this); this.selectionManager = new SelectionManager(this, this.lines, this.rowContainer, this.selectionContainer, this.charMeasure); this.selectionManager.on('refresh', data => this.renderer.refreshSelection(data.start, data.end)); - this.on('scroll', () => { - console.log('scroll'); - this.selectionManager.refresh(); - }); + this.on('scroll', () => this.selectionManager.refresh()); + this.viewportElement.addEventListener('scroll', () => this.selectionManager.refresh()); // Setup loop that draws to screen this.refresh(0, this.rows - 1);