classification
Title: First line and cursor not visible when opening files
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: ned.deily, python-dev, sforman, taleinat
Priority: normal Keywords:

Created on 2011-07-20 03:12 by sforman, last changed 2011-07-27 03:06 by sforman. This issue is now closed.

Messages (4)
msg140716 - (view) Author: Simon Forman (sforman) Date: 2011-07-20 03:12
In IDLE if you open a file that is longer than the editor window the first line, with the cursor, is scrolled off the top of the window making it appear as though the file begins at the second line.

This can be fixed by adding 'text.see("insert")' to the end of the EditorWindow __init__() method, but see Bruce Sherwood's comment on http://bugs.python.org/issue10079#msg118618
msg141200 - (view) Author: Roundup Robot (python-dev) Date: 2011-07-27 01:19
New changeset 73ae3729b8fe by Ned Deily in branch '2.7':
Issue #12590: IDLE editor window now always displays the first line
http://hg.python.org/cpython/rev/73ae3729b8fe

New changeset 1c8aca41845c by Ned Deily in branch '3.2':
Issue #12590: IDLE editor window now always displays the first line
http://hg.python.org/cpython/rev/1c8aca41845c

New changeset b782d7c59f69 by Ned Deily in branch 'default':
Issue #12590: IDLE editor window now always displays the first line
http://hg.python.org/cpython/rev/b782d7c59f69
msg141201 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-07-27 01:26
Thanks for the report and the cite.

The problem appears to be a difference in behavior between Tk 8.5 and earlier versions of Tk and not a platform difference.  The fix is to use that 'yview' method of Text instead of 'see'.  That gives the expected behavior with both Tk 8.5 and 8.4.   Fix is applied to 2.7 (for 2.7.3), 3. 2 (for 3.2.2), and default (for 3.3).  Only security issues are accepted for Python 2.6 but the patch should apply and work there as well.
msg141203 - (view) Author: Simon Forman (sforman) Date: 2011-07-27 03:06
You're very welcome.
History
Date User Action Args
2011-07-27 03:06:07sformansetmessages: + msg141203
2011-07-27 01:26:46ned.deilysetstatus: open -> closed
resolution: fixed
messages: + msg141201

stage: resolved
2011-07-27 01:19:53python-devsetnosy: + python-dev
messages: + msg141200
2011-07-21 08:31:41taleinatsetnosy: + taleinat
2011-07-20 03:16:13ned.deilysetassignee: ned.deily

nosy: + ned.deily
versions: + Python 2.7, Python 3.2, Python 3.3, - Python 2.6
2011-07-20 03:12:21sformancreate