Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support undo #110

Open
tcr opened this issue Jul 18, 2018 · 0 comments
Open

Support undo #110

tcr opened this issue Jul 18, 2018 · 0 comments
Labels
A-text-editor Area: text editor C-feature-large Category: Large feature requiring many changes.

Comments

@tcr
Copy link
Owner

tcr commented Jul 18, 2018

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.

// TODO Generate an "undo" version of the operation and store it.
// This should come from the Op::apply above.

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.

@tcr tcr added C-feature-large Category: Large feature requiring many changes. A-text-editor Area: text editor labels Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-text-editor Area: text editor C-feature-large Category: Large feature requiring many changes.
Projects
None yet
Development

No branches or pull requests

1 participant