The new code fixes
#1451 and is a thorough rewrite of all undo-related code. It's much simpler and robust than before.
I have been happily eating my own dog food for several days. Please report any problems immediately.
I have updated code as necessary throughout Leo's core, all plugins, unitTest.leo and scripts.leo
Code changes
- All the dirtyVnodeList logic is gone. This collapses the complexity of all clients of Leo's undo code, a major simplification.
- Split c.setChanged(flag) into c.setChanged() & c.clearChanged(). The new api is simpler and more robust. I'll soon update the cheat sheet, etc.
- p.setDirty now sets the roots of all external files dirty. This is another big collapse in code complexity.
- Importers should no longer clear c.changed. As I write this, I see some of this got reverted. I'll fix this next.
Summary
There will be no going back to the old way.
Bugs might still exist. Fixes would be much easier in the new world.
Edward