an-cabal / an-rope

an rope data structure
https://docs.rs/an-rope
MIT License
11 stars 2 forks source link

First pass on unicode grapheme based rope splitting and indexing #55

Closed hawkw closed 7 years ago

hawkw commented 7 years ago

This PR adds a first pass on unicode-based rope splitting/insertion/indexing. It's still a work in progress, and it's a bit messy, but it functions basically correctly (although see #54 - we can handle more unicode than we could before this PR, but we still can't handle a handful of really evil strings that shouldn't exist).

This also adds a first pass on the Metric system that @twisted-pear & I have been talking about on Slack - the version of Metric in this PR is more up to date than the version in the dev branch, as I had to make some changes to get it to work. This branch rewrites a lot of our existing internals to add support for Metric, so @twisted-pear, it should be pretty easy to integrate your work on a lines metric on top of this branch.

Closes #52