PR #3455 <https://github.com/leo-editor/leo-editor/pull/3455> will fix three of the four remaining issues. The highlights:
I have spent several days creating demanding unit tests for Leo's paste-node and paste-retaining-clones commands. I shall soon write a similar test for the paste-as-template command. For the first time, we can contemplate changes to all three commands. We can also (for the first time!) test any changes. The unit tests verify that paste-node and paste-retaining-clones work when the clipboard is in copy-as-json format. *Significant changes* The unit tests prove we can remove the strange save/restore code in *fc.getLeoOutlineFromClipBoardRetainingClones* and *fc.getLeoOutlineFromClipBoard*. No amount of theorizing or study could have done the same. As a result, the PR will close #3453 <https://github.com/leo-editor/leo-editor/issues/3453>. The paste-node and paste-retaining-clones commands now support the *pasted nodes win* rule. And yes, the unit tests verify this policy. *To do* The PR will complete #3452 <https://github.com/leo-editor/leo-editor/issues/3452>, a paste-based undo scheme. I'll write a new unit test for the new code. *Note*: the two new unit tests perform three cycles of undo/redo, so they will form the basis for testing the new undo scheme. *Summary* PR 3455 adds urgently needed unit tests for complex code that pastes outlines. The PR changes only about a dozen lines of code. All the rest is scaffolding. That's the way it should be. For the first time, Leo's paste-node-related code rests on a firm foundation. Edward -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/bd8471f1-a994-4135-9eae-ee05e44c15acn%40googlegroups.com.