Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
bpo-17535: IDLE editor line numbers #14030
Tal, thank you for reviving the improving the old patch. This seems to work better than the 2014 version, enough so I want to get this into b3 (scheduled in 3 weeks, 7/29). If we can coordinate, I will help with the needed changes. (I believe some of them amount to fixing parts of the old patch that are now obsolete.)
I would like to immediately follow up with a shell sidebar, which will, among other things, separate prompt and code and allow properly spaced indents instead of the wonky tabbing. (we might do something else immediately, but I want it eventually.) I will try to post something for discussion tomorrow.
Issues (couple of which would be separate).
This happens with custom themes every time we add theme elements. We immediately need to extend previous workaround, but should do a more permanent fix that adds elements, with default values, to custom themes.
The default size of a Text widget with all lines the same height (as in IDLE) is an even number of lines, and when this is true, there are no partial lines to worry about. When a user changes the window height to have a fractional size, IDLE (without this patch) puts a whole line at the top and the fractional line at the bottom. I intend that this remain true.
While using the patch, I discovered that when one scrolls to the bottom of the file, the fractional line moves to the top. It stays there until one scrolls to the top or until the widget just switches back. This looks even worse with line numbers, so a fix would be good if it can be done without making scrolling on macOS worse. (1? adjust window size to an integral number of line after a resize? 2? display a partial unnumbered blank line, like Notepad++.)