RangeSet.compare and deleted mapped ranges

Hi!

Apologies for what might be a stupid question since I’ve worked less with the state side of things, but I’m using RangeSet.compare to compare two sets, one before being mapped to the change, and one after being mapped to the change desc + being updated with RangeSet.update.

I am working with point ranges, and I’m being notified on changes on the ranges except for ranges the are fully covered by a deletion (those that would have been deleted by rangeSet.map(update.changes). I’m just curious if RangeSet.compare isn’t meant to do something like trying to recover what ranges where deleted by map? Though I’m probably misunderstanding something about its use.

Thanks!

RangeSet.compare will only compare the ranges in the unchanged parts of the document (on the assumption that the changed parts will have been completely replaced, and thus changed by default).

What are you doing that requires the deleted points? You could just iterate the replaced ranges from the change set in the old set, which should get you the points you are interested in.

I see, that makes sense. I was using the ranges to store some metadata so I’m interested in the deleted points. Thanks!