summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index b731fc6c..fb11ba2e 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -240,6 +240,10 @@ class Backend {
// Event handlers
async _onClipboardTextChange({text}) {
+ const {general: {maximumClipboardSearchLength}} = this.getOptions({current: true});
+ if (text.length > maximumClipboardSearchLength) {
+ text = text.substring(0, maximumClipboardSearchLength);
+ }
try {
const {tab, created} = await this._getOrCreateSearchPopup();
await this._focusTab(tab);