On Jun 24, 10:48 am, "Edward K. Ream" <
edream...@gmail.com> wrote:
> It appears there is a blunder in u.undoInsertNode.
The problem was much more interesting than that, and happily much
easier to fix. The fix is on the trunk at rev 579.
It turns out that a call to c.redraw_now must be made at the end of
undo() and redo() **before** setting u.undoing to False. If the
redraw is made later (as would happen in c.outerUpdate), a call to
c.endEditing will, via a complex chain of events, cause Leo to think
that a headline has been changed. Chaos will ensue, as the undo stack
gets "chopped" and other bad things happen.
It's possible that c.outerUpdate can be called instead of
c.redraw_now, but that's just a case of "greed" (trying to eliminate
unnecessary redraws during undo/redo). I won't mess with this until
after b1.
Anyway, the fix appears to work as expected, and furthermore, the bug
explains all the headline symptoms, so it looks like this simple fix
will likely fix all undo problems. We shall see...
Edward