diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-04-06 22:02:49 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-04-06 22:02:49 -0700 |
commit | fcd27179daaa1cb4d99cc17f55412852e00dc6a3 (patch) | |
tree | a4b1d25414f12fb996ab26edffdb97cbde025703 /ext/fg/js/util.js | |
parent | 0acc0ad90ce862d30c2c4480b64d65a2e3d10ca1 (diff) |
Actually use lookahead option now
Diffstat (limited to 'ext/fg/js/util.js')
-rw-r--r-- | ext/fg/js/util.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/util.js b/ext/fg/js/util.js index eb153e9b..4f4bcbd3 100644 --- a/ext/fg/js/util.js +++ b/ext/fg/js/util.js @@ -17,7 +17,7 @@ */ -function getRangeAtPoint(point, lookAhead) { +function getRangeAtPoint(point, scanLength) { const range = document.caretRangeFromPoint(point.x, point.y); if (range === null) { return null; @@ -29,7 +29,7 @@ function getRangeAtPoint(point, lookAhead) { } const offset = range.startOffset; - const length = Math.min(node.length - offset, lookAhead); + const length = Math.min(node.length - offset, scanLength); if (length === 0) { return null; } |