From 6f5f68df1a15e958e97735daba66f72aab4a72fd Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 20 Jun 2017 10:24:16 -0700 Subject: [PATCH] Add a comment --- src/xterm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xterm.js b/src/xterm.js index 1bcb45d0b..4236d4f8f 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -721,6 +721,9 @@ Terminal.prototype.open = function(parent, focus) { this.renderer.refreshSelection(data.start, data.end); }); this.selectionManager.on('newselection', text => { + // If there's a new selection, put it into the textarea, focus and select it + // in order to register it as a selection on the OS. This event is fired + // only on Linux to enable middle click to paste selection. this.textarea.value = text; this.textarea.focus(); this.textarea.select();