On Sat, Feb 27, 2010 at 12:05 PM, Terry Brown <[email protected]> wrote:

>> - I go back to the previous node and I see its head, since the cursor
>> position wasn't saved when the node has lost focus
>>
>> Any ideas how to deal with this?
>
> It's actually the scroll position which isn't saved, not the cursor position.
>
> Workaround: after scrolling down click the cursor into any line of the long 
> text before navigating to the other node, on return the long text will be 
> showing the line / part of the long text you clicked.
>
> Fix: post a bug / wishlist for scroll positions to be saved between visits to 
> nodes.

There is code in setBodyTextAfterSelect that restores the scroll
position, but it can be over-ridden by later code that forces the
insertion point to be visible.

A naive fix would be simple: in setBodyTextAfterSelect, put the code
the restores the insert point before the code that restores the scroll
position.

The question is, is this a good fix?  Does it make sense to come back
to exactly where editing left off, or is it better always to see the
insert point?  I'm not sure.

Rev 3016 of the trunk applies the naive fix.  All unit tests pass,
which was not a foregone conclusion.

Only time will tell whether this new way causes problems.  I should
point out that moving the cursor in any way will cause a call to
w.see(), which scrolls as necessary to make the cursor visible.  Thus,
this fix is likely not to cause consternation or confusion, but I
wouldn't bet my life on that.

Edward
------------------------------------------------------------------------------
Edward K. Ream email: [email protected]
Leo: http://webpages.charter.net/edreamleo/front.html
------------------------------------------------------------------------------

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