On Thursday, August 17, 2023 at 6:53:00 AM UTC-5 Edward K. Ream wrote:

> This Engineering Notebook post discusses subtle problems with Leo's 
paste-outline commands: paste-node, paste-retaining-clones, and 
paste-as-template. A new unit test (in PR #3473 
<https://github.com/leo-editor/leo-editor/pull/3473>) revealed these 
problems. They may be ancient.

There may be problems with Leo's paste-outline commands, but these issues 
likely arise from new code. For the record, that's good news :-)

> Lurking behind all this code is the infamous fc.gnxDict dictionary. Keys 
are gnxs; values are the corresponding VNodes. *c.recreateGnxDict* 
supposedly recreates this dict. Various read/write/paste helpers save and 
restore this dict for impossible-to-remember reasons.

A cff reveals 43 places where Leo uses this dict. It *almost* always works 
the way I wanted the new  *c.all_gnxs_dict* to work. Again, that's good 
news. There is no need for a new dict:

- Remove c.recreateGnxDict.
- Remove all save/restore logic pertaining to fc.gnxDict*.*
*- *Write new unit tests for this dict, especially during undo/redo.

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/37e9b9f6-dd30-49b3-9f12-821b63a454e3n%40googlegroups.com.

Reply via email to