On Sat, Dec 17, 2011 at 8:11 PM, HansBKK <[email protected]> wrote:
> It appears that when I delete a clone from a given position in the outline,
> the cursor location in the outline pane jumps to that of another instance of
> the node whose clone was deleted.
I haven't seen this behavior before. Are you able to duplicate it for
a simple test case in a brand new outline? I'm not. If you can't
duplicate it in a new outline either, then I wonder what is different
between your complicated outline and the brand new one. If you can
duplicate it even for a simple test case, then I wonder what is
different between your setup and mine.
Here is a script I whipped up to ensure you and I are trying the same
thing in for the simple test case. To use it, just open a new
outline, paste the following text into the default node and hit Ctrl-b
(or Edit -> Execute Script) to execute the script.
######### start script
# Make aliases for less typing
mb = c.executeMinibufferCommand
cp = c.currentPosition
mb('insert-child')
cp().h = 'deep clone'
mb('insert-child')
cp().h = 'sub1'
mb('insert-child')
cp().h = 'the clone'
mb('clone-node')
mb('move-outline-left')
mb('move-outline-left')
mb('move-outline-up')
mb('insert-node')
cp().h = "selection should be here after deleting top level clone"
mb('move-outline-up')
mb('goto-next-sibling')
g.es('deleting toplevel clone: "%s"' % cp().h)
mb('delete-node')
g.es('selected node after clone delete: "%s"' % cp().h)
########## end script
The output I saw in my log pane was this:
deleting toplevel clone: "the clone"
selected node after clone delete: "selection should be here after
deleting top level clone"
Another reason I shared this script is to illustrate how easy it can
be to write scripts. What I've written is very similar to what you
might have come up with for an AutoHotKey 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.