Hi Terry, I tried the new build (rev 5423) and inserted a @bool maintain_scroll = True node in the @settings tree in leoSettings.leo, and restarted Leo. I didn't observe any change in behavior in body text jumping (i.e. still there).
I tried to run the check-settings script button but got the following error: exception executing script IOError: [Errno 9] Bad file descriptor -------------------- line 96: * line 97: print(format % (munged_s,match_list)) line 98: #@+node:error line 99: def error (self,s): My Python is 2.7. Scripts appear to be written in Python 3. On Monday, August 13, 2012 6:36:52 AM UTC-7, Terry wrote: > > > I've been trying to get to grips with Leo's ongoing scroll position / > restoration issues. > > [F.S. - if you could test the change below with > @bool maintain_scroll = True somewhere in your > settings with rev. 5421 either from bzr or > http://www.greygreen.org/leo/ tomorrow] > > LeoPyRef.leo#Code-->Qt gui-->@file ../plugins/qtGui.py--> << define > text widget classes >>--> << define leoQTextEditWidget class > >>-->Widget-specific overrides (leoQTextEditWidget)-->getYScrollPosition > (leoQTextEditWidget) > > Claims that Qt reports the wrong scroll position when the cursor is not > visible. I'm not convinced. This probe code: > > def sp(): > print c.frame.body.bodyCtrl.getYScrollPosition(), \ > c.frame.body.bodyCtrl.widget.verticalScrollBar().sliderPosition() > > if not hasattr(g, '_sp'): > g._sp = sp > g.registerHandler('idle', lambda a,b:g._sp()) > > g._sp = sp > > seems to report sensible scroll position information all the time, > whether adjusted by dragging the scroll bar, mouse wheel rolling, > entering text, etc. > > I think doubting getYScrollPosition() has led to use of > ensureCursorVisible() more than it should be. I've added a > maintain_scroll bool @setting to suppress a couple of calls to > ensureCursorVisible() in odd places which caused body text to jump to > the cursor position when focus moved in and out of the Leo window. > This scratched an itch for me, the body text moving when I was > trying to read it against some other text like API docs. in a browser. > > I'm not sure if it's impacted body text jump bug. > > Cheers -Terry > > > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To view this discussion on the web visit https://groups.google.com/d/msg/leo-editor/-/cN7vFs_3tKgJ. 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.
