hterm: double click should expand selection whether "copy-on-select" is on or off
BUG=chromium:822559
Change-Id: Ie7681f735a6c230512dcc68fe384f5dd261c522d
Reviewed-on: https://chromium-review.googlesource.com/965728
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: John Lin <johnlinp@gmail.com>
diff --git a/hterm/js/hterm_terminal.js b/hterm/js/hterm_terminal.js
index 60e2b06..998c57f 100644
--- a/hterm/js/hterm_terminal.js
+++ b/hterm/js/hterm_terminal.js
@@ -3340,9 +3340,10 @@
}
if (!reportMouseEvents) {
- if (e.type == 'dblclick' && this.copyOnSelect) {
+ if (e.type == 'dblclick') {
this.screen_.expandSelection(this.document_.getSelection());
- this.copySelectionToClipboard(this.document_);
+ if (this.copyOnSelect)
+ this.copySelectionToClipboard(this.document_);
}
if (e.type == 'click' && !e.shiftKey && (e.ctrlKey || e.metaKey)) {