Leo 6.7.4: status report

28 views
Skip to first unread message

Edward K. Ream

unread,
Jul 24, 2023, 2:08:34 PM7/24/23
to leo-editor

PR #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.


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, 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

Thomas Passin

unread,
Jul 24, 2023, 4:20:40 PM7/24/23
to leo-editor
On Monday, July 24, 2023 at 2:08:34 PM UTC-4 Edward K. Ream wrote:

The PR will complete #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. 


It is not expected for an undo operation to change the clipboard.  So please restore the original clipboard contents after the undo.

Edward K. Ream

unread,
Jul 24, 2023, 5:48:58 PM7/24/23
to leo-e...@googlegroups.com
> It is not expected for an undo operation to change the clipboard.  So please restore the original clipboard contents after the undo.

Neither undo nor redo changes the clipboard. These operations merely delete or reinsert the pasted node.

Edward
Reply all
Reply to author
Forward
0 new messages