automerge / automerge-swift

Swift language bindings presenting Automerge

Home Page:https://automerge.org/automerge-swift/documentation/automerge/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cursor enhancement

heckj opened this issue · comments

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)