kashifimran / math-editor

An equation editor for creating mathematical and scientific documents.
MIT License
108 stars 43 forks source link

Undo/Redo Issues #11

Open MovGP0 opened 3 years ago

MovGP0 commented 3 years ago

Undo/Redo is currently buggy. Do

Alternatively implement the following:

Note: logging and stack traces might be required to identify the issues.

kashifimran commented 3 years ago

I think it would be much better to fully remove undo/redo. It's a hurried implementation and is very hard to maintain and fix. It would be much simpler and easier to simply use the serialization/de-serialization routines instead of working with the current in-memory mechanism. Trying to fix and maintain the current implementation would be a nightmare. Better get rid of it even if it's not available for a while.

MovGP0 commented 3 years ago

We might want to evaluate Undo/Redo frameworks.

kashifimran commented 3 years ago

I had a look. I don't think these will be helpful. These solve the easy problem, which is solved in Math Editor i.e. the part that calls undo/redo. The troubled part is the actual code that applies the changes. It was not done very cleanly. If the bugs could be fixed, it will work though. But the related code is hard to understand.