summaryrefslogtreecommitdiff
path: root/ext/mixed/js/text-scanner.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/text-scanner.js')
-rw-r--r--ext/mixed/js/text-scanner.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index a05dd2ee..88f1e27a 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -281,6 +281,7 @@ class TextScanner {
setOptions(options) {
this.options = options;
+ this.setEnabled(this.options.general.enable);
}
async searchAt(x, y, cause) {
@@ -298,11 +299,11 @@ class TextScanner {
}
const textSource = docRangeFromPoint(x, y, this.options.scanning.deepDomScan);
- if (this.textSourceCurrent !== null && this.textSourceCurrent.equals(textSource)) {
- return;
- }
-
try {
+ if (this.textSourceCurrent !== null && this.textSourceCurrent.equals(textSource)) {
+ return;
+ }
+
this.pendingLookup = true;
const result = await this.onSearchSource(textSource, cause);
if (result !== null) {