diff --git a/lib/components/term.js b/lib/components/term.js index 3233ead3..e22dbab5 100644 --- a/lib/components/term.js +++ b/lib/components/term.js @@ -129,9 +129,15 @@ export default class Term extends PureComponent { } } - onMouseUp() { - // handle copying selected text - if (this.props.copyOnSelect && this.term.hasSelection()) { + onMouseUp(e) { + if (this.props.quickEdit && e.button === 2) { + if (this.term.hasSelection()) { + clipboard.writeText(this.term.getSelection()); + this.term.clearSelection(); + } else { + document.execCommand('paste'); + } + } else if (this.props.copyOnSelect && this.term.hasSelection()) { clipboard.writeText(this.term.getSelection()); } }