Handle scrolling of selection

This commit is contained in:
Daniel Imms
2017-05-19 23:32:26 -07:00
parent ad3ae67e70
commit 2f6d05f99d
+2 -4
View File
@@ -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);