redoGroup oops: expecting bunch.items. bunch.kind = insertredoGroup g.Bunch()dirtyVnodeList: []kind: insertnewBack: <pos 139670364254672 childIndex: 0 lvl: 0 key: 139670742747232:0 NewHeadline>newChanged: TruenewDirty: TruenewMarked: FalsenewP: <pos 139670364258088 childIndex: 1 lvl: 0 key: 139670364257360:1 test redo>newParent: <pos 139670364257808 [0] None>oldChanged: FalseoldDirty: FalseoldMarked: FalseoldSel: (0, 0)p: <pos 139670364286200 childIndex: 1 lvl: 0 key: 139670364257360:1 test redo>pasteAsClone: FalseredoHelper: <bound method Undoer.redoInsertNode of <leo.core.leoUndo.Undoer object at 0x7f07a018dfd0>>undoHelper: <bound method Undoer.undoInsertNode of <leo.core.leoUndo.Undoer object at 0x7f07a018dfd0>>undoType: Paste Node
I wrote some code to perform 2 node inserts. I added before/after undo commands and undo/redo of the individual operations seemed to work fine. But when I enclose the two operations in before/after changeGroup, then redo doesn't work.
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS1RaaS8qumebOtNLaT%3DLVpx_kajWcTjjQUGfnV8LuW3Ng%40mail.gmail.com.
Thanks a lot. I'll give it a try tonight and also see if I can get similar code working for clone and move. After that I can try to put it all together.
--
c.createNodeHierarchy(['a', 'b', 'c'], parent=p)Redoing this operation gives the same error as the test code and the bead+1 fixes it also. I think this bug is affecting all grouped redo.
c.redraw(p)
I found a core function which uses undo groups and used this code to call it:c.createNodeHierarchy(['a', 'b', 'c'], parent=p)Redoing this operation gives the same error as the test code and the bead+1 fixes it also. I think this bug is affecting all grouped redo.
c.redraw(p)
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS20sv7uEzmpFH8Sf65h5JRDF_kX_rvDyggbqK8%2BhJKi5g%40mail.gmail.com.
Unfortunately, I'm not able to run unit tests without getting a segfault.
It turns out the '-m pdb' workaround for the readline crash does work for me running unit tests.
I decided I wanted to follow the good practice of adding a failing unit test which exposes the bug and then show after the fix that same test passes. I discovered there are already unit tests for other group undo commands like convertAllBlanks and convertAllTabs and I wondered how those tests were passing. It turns out all the undo/redo tests start with a fresh undo stack. The off-by-one error of this bug causes the bead index to be -1 instead of 0. But for a single element list array, indices -1 and 0 point to the same list element. So the group redo will always function properly when it is the only item on the list.
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS1A0Raz9w4TTMmstTG%2BPeRU7hUnbSyFWhsPUszPZubAqQ%40mail.gmail.com.
I submitted pull request https://github.com/leo-editor/leo-editor/pull/1302. No new failed test cases and the failing test case I added passes.