PR 1725 summarizes all the many changes. The highlights:
New methods: u.beforeChangeBody and u.afterChangeBody
These two new undoer methods should make it much easier for script to handle undo. Here is an example @button test script:
u = c.undoer
command = 'Uppercase Body'
bunch = u.beforeChangeBody(p)
p.b = p.b.upper()
c.setChanged()
p.setDirty()
u.afterChangeBody(p, command, bunch)
This pattern could be a model for future Leo commands, but I have no plans to change existing code.
New methods: u.beforeChangeHead and u.afterChangeHead
Likewise, these methods should simplify the handling of undo when changing headline.
Simplified headline code behind the scenes
The new code eliminates several very ugly hacks, including some evil kwargs. This work should be invisible to Leo's users.
Summary
The ekr-undo branch should be safe. Any remaining problems are likely to be minor. I have been eating my own dog food for several days without indigestion.
Please report any problems immediately. I'll merge ekr-undo into devel in about two weeks.
Edward