KB1RD / matrix-notepad

A buggy way to collaborate on text documents using the Matrix protocol. When it works, consider this the Matrix Console of collaboration!
https://matrix-notepad.kb1rd.net/
GNU General Public License v3.0
67 stars 1 forks source link

Undo causes the editor to undo remote changes #10

Open KB1RD opened 4 years ago

KB1RD commented 4 years ago

When Ctrl + Z is pressed, behavior must be well-defined. In the current case, text from the initial sync is removed with undo, which may come in with a different order, so very old changes are most likely the first to be undone. For the average user, this makes no sense. Since timestamps cannot be trusted, establishing order of undo operations would be difficult. I'm considering the following approaches:

KB1RD commented 4 years ago

I think that it would be best to base undo history off of whatever edits the user has made. I do not think that it would be a good idea to allow undoing of other user's operations.