You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6c27e1a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(core): exclude ranges that cover no byte (#12)
A parser produces zero-length ranges — a record covering no byte is a
fact about the file, not a mistake — and one of them was enough to cost
a consumer the whole view. `IntervalIndex` sorts its build on a centre
test that `start === end` can never satisfy, so such a range fell to a
child at every level and, once alone in a list, split into itself for
ever: a stack overflow in the constructor. `IntervalColumns` did not
hang but answered wrongly, reporting an empty range as overlapping any
query that contained it, which `DecorationStore.between` handed to the
renderer.
Both indexes now leave out a range with `end <= start`. That is what
half-open already means, so no answer changes, and it is what
`DecorationStore.map` already did with a range an edit had emptied.
A range reaching to infinity failed the same way by another route: its
midpoint is not finite, and a centre of `Infinity` sits inside nothing,
so every range went to one child. The centre falls back to a median
start, which a range always covers, so both children come out strictly
smaller whatever the bounds are.
0 commit comments