On Sun, Dec 18, 2011 at 7:37 PM, HansBKK <[email protected]> wrote:
> Letting your script delete the node gives the expected (correct) result.
>
> Deleting the same node **manually** (rt-click delete) gives me the jumping
> behaviour, in this case to the top location.
Finally I'm able to duplicate the issue. Just like you said only when
deleting via right click menu. Deleting via minibuffer command
doesn't exhibit the issue.
So there must be some difference between the minibuffer and picking
via the menu which is making the difference. Nice job figuring that
out.
I've reduced the script to the minimal amount needed to duplicate the
problem. However, I don't know how to simulate right-click menu in a
script, so that last step must be done manually.
# 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('insert-node')
cp().h = '2a'
mb('goto-parent')
mb('move-outline-left')
# The outline is setup, now select '2a'
mb('goto-next-node')
mb('goto-next-node')
# Delete 2a and display the selected node to the log
# Executing 'delete-node' via minibuffer command does
# not replicate the problem. Only deleting via
# right click menu exhibits the problem. I'm not sure
# how to simulate right-click menu in script
#g.es('selected node before clone delete: "%s"' % cp().h)
#mb('delete-node')
#g.es('selected node after clone delete: "%s"' % cp().h)
#g.es('parent of selected node: "%s"' % cp().parent().h)
--
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.