On Wed, Oct 5, 2011 at 2:57 PM, Edward K. Ream <[email protected]> wrote:
> However, there is a cute hack:
>
>    after = p.nodeAfterTree()
>    next = p.copy() if after == p.next() else after
>    p.doDelete()
>    p = next

Oops. If p is the last visible node, both p.next() and after will be
empty.  We had best not set next = p.copy() in that case!  The correct
code is probably (lightly tested)::

    next = p.copy() if after and after == p.next() else after

Yes, this is a hack, but it's a really great hack :-)

Edward

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