Support undo
Opened this issue · 0 comments
tcr commented
If OT::apply were to have a sibling method OT::apply_reversable(...) which returned a tuple (Doc, reverse_op), where reverse_op applied to Doc would result in the inverse method, then undo could be possible.
edit-text/edit-client/src/state.rs
Lines 274 to 275 in 55003ee
Here the undo would be generated, and then attached to the self object. Each time an operation is performed, this undo is replaced (or queued, for multiple-level undo) or if we have incoming packets, the undo packet is transformed against the incoming packet.