Cursor enhancement
heckj opened this issue · comments
Joseph Heck commented
Following up from initial cursor support in #69:
- concept of a a default cursor for tracking AutomergeText
- worth noting that
UITextField
thinks in terms of NSRange. Potentially track this with two cursors - start and end - to allow range to expand/shrink with applied updates. - look at spliceText (in the Rust layer/swift interface) and consider allowing a cursor as an argument in addition to an index, for convenience/developer ergonomics.
- allow a swift-oriented initialized for a cursor on
.Text
that starts with a String.Index to set the position of the cursor (translate String.Index to UTF8-view position and retrieve cursor reference from that)