#14 Goto Line Should Not Display At Top Of Window

closed
nobody
None
5
2007-04-12
2005-11-26
No

When you click on a traceback line in the Prompt widow
it is displayed at the top of the text window. This is
inconvenient as the cause of the fault is more likely
to be found before rather than after the line where it
was detected.

In drPrompt.py there is a function OnGotoTraceback that
contains the line:

self.grandparent.txtDocument.ScrollToLine(linenumber)

This should be changed to:

top = linenumber -
self.grandparent.txtDocument.LinesOnScreen()/2

if top < 0: top - 0

self.grandparent.txtDocument.ScrollToLine(top)

--------------------------------------------------
A similar change could be made to the OnGoTo function
in drpython.py:

top = v - self.txtDocument.LinesOnScreen()/2

if top < 0: top = 0

self.txtDocument.ScrollToLine(top)

In order to highlight the displayed line the GotoLine
statement should be followed by:

self.txtDocument.SetFocus()

Discussion

  • Logged In: YES
    user_id=772872
    Originator: NO

    thanks, applied to DrPyhton 165.

     
    • status: open --> closed