davidbalbert / Watt

A high performance text editor for macOS.
MIT License
57 stars 2 forks source link

Use fixup to maintain Spans invariants #99

Closed davidbalbert closed 10 months ago

davidbalbert commented 10 months ago

The invariant: all equal adjacent spans are merged.

Doing this included changing BTreeLeaf's fixup interface so that instead two fixup methods (withPrevious, and withNext), we now have a single fixup(withNext:) method that can also mutate the next leaf.