diff options
Diffstat (limited to 'ext/fg/js/source-range.js')
-rw-r--r-- | ext/fg/js/source-range.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/source-range.js b/ext/fg/js/source-range.js index 5db0ffc7..58b6a415 100644 --- a/ext/fg/js/source-range.js +++ b/ext/fg/js/source-range.js @@ -37,14 +37,14 @@ class TextSourceRange { const state = TextSourceRange.seekForward(this.rng.startContainer, this.rng.startOffset, length); this.rng.setEnd(state.node, state.offset); this.content = state.content; - return length - state.length; + return length - state.remainder; } setStartOffset(length) { const state = TextSourceRange.seekBackward(this.rng.startContainer, this.rng.startOffset, length); this.rng.setStart(state.node, state.offset); this.content = state.content; - return length - state.length; + return length - state.remainder; } containsPoint(point) { |