Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First line and cursor not visible when opening files #56799

Closed
sforman mannequin opened this issue Jul 20, 2011 · 4 comments
Closed

First line and cursor not visible when opening files #56799

sforman mannequin opened this issue Jul 20, 2011 · 4 comments
Assignees
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@sforman
Copy link
Mannequin

sforman mannequin commented Jul 20, 2011

BPO 12590
Nosy @taleinat, @ned-deily

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/ned-deily'
closed_at = <Date 2011-07-27.01:26:46.069>
created_at = <Date 2011-07-20.03:12:21.160>
labels = ['expert-IDLE', 'type-bug']
title = 'First line and cursor not visible when opening files'
updated_at = <Date 2011-07-27.03:06:07.702>
user = 'https://bugs.python.org/sforman'

bugs.python.org fields:

activity = <Date 2011-07-27.03:06:07.702>
actor = 'sforman'
assignee = 'ned.deily'
closed = True
closed_date = <Date 2011-07-27.01:26:46.069>
closer = 'ned.deily'
components = ['IDLE']
creation = <Date 2011-07-20.03:12:21.160>
creator = 'sforman'
dependencies = []
files = []
hgrepos = []
issue_num = 12590
keywords = []
message_count = 4.0
messages = ['140716', '141200', '141201', '141203']
nosy_count = 4.0
nosy_names = ['taleinat', 'ned.deily', 'python-dev', 'sforman']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue12590'
versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

@sforman
Copy link
Mannequin Author

sforman mannequin commented Jul 20, 2011

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

@sforman sforman mannequin added topic-IDLE type-bug An unexpected behavior, bug, or error labels Jul 20, 2011
@ned-deily ned-deily self-assigned this Jul 20, 2011
@python-dev
Copy link
Mannequin

python-dev mannequin commented Jul 27, 2011

New changeset 73ae3729b8fe by Ned Deily in branch '2.7':
Issue bpo-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 bpo-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 bpo-12590: IDLE editor window now always displays the first line
http://hg.python.org/cpython/rev/b782d7c59f69

@ned-deily
Copy link
Member

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.

@sforman
Copy link
Mannequin Author

sforman mannequin commented Jul 27, 2011

You're very welcome.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant