-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
IDLE: Display up to maxlines non-blank lines for Code Context #77823
Comments
Item 7 from bpo-33610:
Tip: For manual tests, help.py works really well in viewing 15 lines. |
2 quick thoughts.
|
I know we usually don't change defaults, but I had tested this one and I think it works. After I changed it to 15 lines in master, I opened the installed version of IDLE 2.7. Although it showed 15 fixed lines, it made sense since that was the number of lines in the 3.8 version. I figured a typical user would be using whichever version of IDLE comes with their current Python. So, at some point the OS would upgrade it and they would be moving from a version with fixed lines to a version with variable lines (for Python 3). If they had previously changed their settings, it would still use whatever they had changed it to as the limit, but now the context area would grow and shrink (so they would know the change exists). If they hadn't customized their settings, it would just change from 3 to 15. If the user switches between two versions (like when I tested with 2.7), then I think seeing the changes almost makes more sense to them. They can see it at 15 in the new version and watch it grow and shrink. Then it the 2.7 version, it looks the same, but without the expansion/contraction. It's a demonstration of what makes the variable sizing nice to have. Although it may lead to someone wanting it in 2.7. :-) Anyway, that was my thinking process. When you try it out, you may not agree, but it made sense to me when I saw what was happening. Note: one time this didn't quite work was when I set the line limit to 90. 3.8 worked great -- just like it had with 15 (that is, it never ate the whole editor window). But, under 2.7, it ate the whole window and without the |
Unlinked duplicate PR entry. I have no idea how that could happen. |
After testing the patch as a user, I would like 3 user-visible changes.
I will post other thoughts on the master issue, bpo-33610. |
I pushed a commit for these three items. |
On Windows, I observe the following behaviors.
What do you see on Linux? |
I see similar behavior on Linux, except after maximizing and then minimizing, it seems to stay with option 2. |
I am leaving this open until the new behavior is documented, even though it might be part of another issue that includes other context changes. For this issue, I will leave what happens when unzooming unspecific. |
Summary for users: Previously, Code Context displayed a fixed number of lines. Often, many were blank. Hence the default *numlines* to display was small, 3, to avoid having too many blank lines. However, 3 is often too small to display the complete context. Now, Code Context initially displays a single blank line for 'no context', to show that the feature is active. When the top visible line is part of an indented body, the context used as many non-blank lines as needed, up to a maximum of *maxlines*, which has a default of 15. Because a new configuration option is used, there should be no interference between user settings for old releases and future releases. Initially, context lines are added to an expanded editor window. When the height of the window has been maximized, perhaps with the zoomheight feature, and when the height of the window has been reset with the mouse, context lines replace normal code text. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: