Skip to content

How do cursors update work? #5

@TristanCacqueray

Description

@TristanCacqueray

Hello,

The cursor update doesn't seem to work in that example:

λ> import Control.OperationalTransformation.Text
λ> Right (op, cursor, state) = Control.OperationalTransformation.Server.applyOperation
    (Control.OperationalTransformation.Server.initialServerState (" world" :: Text)) 0
    (TextOperation [Insert "hello", Retain 6])
    (Control.OperationalTransformation.Selection.Range 1 1)
λ> cursor
Range {rangeAnchor = 1, rangeHead = 1}

Shouldn't the cursor be moved by 5 character to the right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions