On Sun, Dec 18, 2011 at 3:28 AM, HansBKK <[email protected]> wrote:
[...]
> The problem comes when deleting a cloned node in a "foreign tree" whose
> immediate "node above" (not necessarily parent) is a clone which has another
> instance in a lower tree.
>
> But deleting 2B in tree 3 triggers it, but doing so in tree 2 does not.
>
> Anyway, simple enough example to show the issue exists?

This kind of simple is definitely useful, but somehow I wasn't able to
reproduce.

I wrote a script to duplicate your screenshot.  Comment out the last 3
lines to verify I have the outline structure the same as you.  When I
run the full script, the output to the log pane is:

selected node after clone delete: "2a"
parent of selected node: "3"

Here is the script:


########### Begin script
# Make aliases for less typing
mb = c.executeMinibufferCommand
cp = c.currentPosition

mb('insert-child')
mb('insert-child')
cp().h = '1'
mb('insert-child')
cp().h = '1a'
mb('clone-node')
mb('insert-node')
cp().h = '2'
mb('goto-prev-sibling')
mb('move-outline-down')
mb('move-outline-right')
mb('goto-prev-node')
mb('move-outline-left')
mb('insert-child')
cp().h = '2b'
mb('goto-prev-node')
mb('insert-child')
cp().h = '2a'
mb('goto-prev-node')
mb('insert-child')
cp().h = '3'
mb('goto-next-node')
mb('clone-node')
mb('move-outline-up')
mb('move-outline-right')
mb('goto-next-node'); mb('goto-next-node')
mb('clone-node')
mb('move-outline-up'); mb('move-outline-up')
mb('goto-next-node'); mb('goto-next-node')
mb('goto-next-node')
mb('clone-node')
mb('move-outline-up'); mb('move-outline-up')
mb('move-outline-up')
mb('move-outline-up'); mb('move-outline-up')
mb('goto-prev-node')
mb('move-outline-left')

# Tree is now setup except expansion level doesn't match
# the screenshot, so expand the nodes to match
mb('goto-prev-visible')
mb('expand-or-go-right')
mb('goto-prev-visible')
mb('expand-or-go-right')

# Goto the 3.2b node
mb('goto-next-sibling'); mb('goto-next-sibling')
mb('goto-next-node'); mb('goto-next-node')
mb('goto-next-node')

# Delete 3.2b and display the selected node to the log
mb('delete-node')
g.es('selected node after clone delete: "%s"' % cp().h)
g.es('parent of selected node: "%s"' % cp().parent().h)
############## end script

Brian

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to