Btw, I meant to quote that I did neither notice that behaviour until I had to read so much in Leo.
On Thu, Aug 21, 2014 at 9:45 AM, Fidel N <[email protected]> wrote: > I've never use Leo to read long chunks of text linearly... > > > Exactly, neither did I until I decided to study my public exam within Leo > > >> So there are misbehaviors in both implementations. I don't immediately >> > > Yes, I also noticed what you mention, but didn't think this had the > possibility to replace the current implementation so didn't bother. > A fix for that would be this: > > scroll_changed = c.frame.body.bodyCtrl.getYScrollPosition() > lines = c.frame.body.bodyCtrl.linesPerPage() > cursor_position = 0 > for number in range(lines): > cursor_position=cursor_position+1 > c.executeMinibufferCommand("next-line") > if not scroll_changed == c.frame.body.bodyCtrl.getYScrollPosition(): > break #We reached the first line outside the current view of the text. > if cursor_position > (lines * 2): > break # Too many lines, we are either in the bottom of the document > > for number in range(lines-1): > c.executeMinibufferCommand("next-line") > > #Now you can optionally go back "lines-cursor_position" lines to put the > cursor where it 'was'. > > > Fidel. > > -- > You received this message because you are subscribed to the Google Groups > "leo-editor" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/leo-editor. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
