summaryrefslogtreecommitdiff
path: root/ext/fg/js/client.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-07-24 21:18:17 -0700
committerAlex Yatskov <alex@foosoft.net>2016-07-24 21:18:17 -0700
commit19cc8fda335f27229753038709f3765090e169e8 (patch)
tree49ee07eb15e84c78eca7e07ac81aa88a2c453f08 /ext/fg/js/client.js
parent871acf7c2d75b349e55b761d5513223cf716464e (diff)
Better range handling.
Diffstat (limited to 'ext/fg/js/client.js')
-rw-r--r--ext/fg/js/client.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js
index bb0d3749..9806b96a 100644
--- a/ext/fg/js/client.js
+++ b/ext/fg/js/client.js
@@ -110,13 +110,13 @@ class Client {
return;
}
- textSource.setLength(this.options.scanLength);
+ textSource.setEndOffset(this.options.scanLength);
bgFindTerm(textSource.text(), ({definitions, length}) => {
if (length === 0) {
this.hidePopup();
} else {
const sequence = ++this.sequence;
- textSource.setLength(length);
+ textSource.setEndOffset(length);
bgRenderText(
{definitions, root: this.fgRoot, options: this.options, sequence},