This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2017年06月14日 09:14 by louielu, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 2183 | closed | louielu, 2017年06月14日 09:16 | |
| Messages (4) | |||
|---|---|---|---|
| msg295995 - (view) | Author: Louie Lu (louielu) * | Date: 2017年06月14日 09:14 | |
In #7676, the desired pattern request from Terry is to create a sidebar and show the prompt in the sidebar. To complete the request, this patch add the lineno sidebar in editor window , to prove that the sidebar in IDLE is feasible. The different in pyshell, it that the sidebar will need to deal with indent (to not show the prompt). |
|||
| msg347502 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年07月08日 17:58 | |
A closing note: Saimadhav Heblikar's initial patch on #17535 was a standalone proof-of-concept file was based on Canvas and Text subclasses. The latter consisted mostly of two tk.eval(tcl_code) calls. I rejected the idea of using tk.eval, as review and maintenance would requires knowing tcl. But the submission won him my GSOC mentorship (and we did quite well working together, even though line-numbering was not finished). Saimadhav's poc appears to have been inspired by Bryan Oakley's Canvas and Text-based answer a year earlier on https://stackoverflow.com/a/16375233. But Bryan only used tk.call and tk.createcommand, not tk.eval. Some of Saimadhav's tcl appears to be a translation of some of Bryan's python. PR 2183 is a full patch also based on Canvas and Text and explicitly inspired by Oakley's answer. However, the Text subclass is an edited version of Saimadhav's tk.eval version, not Oakley's. This is properly closed as a duplicate, but it does provide the Oakley link, which does not appear on #17535. |
|||
| msg347523 - (view) | Author: Tal Einat (taleinat) * (Python committer) | Date: 2019年07月09日 06:42 | |
Thanks for helping to move this forward, Louie! My worry with this approach is that all of the line numbers are redrawn upon scrolling, which would be likely to make scrolling less smooth, especially on low-end hardware (where IDLE is relatively often used). The alternate implementation approach we are pursuing in #17535 uses a second text widget, whose scrolling is synced to the main text widget, and whose contents are only updated when the number of lines in the main text widget changes. |
|||
| msg347594 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年07月10日 02:59 | |
Oakley's patch was intentionally very general, allowing line number heights to vary because of different fonts, font sizes, or widget inclusions. This required positioning line numbers by pixel (hence canvas) and accommodating line size changes even in the absence of newline changes. IDLE's need is simpler (fortunately)l. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:47 | admin | set | github: 74848 |
| 2019年07月10日 02:59:49 | terry.reedy | set | messages: + msg347594 |
| 2019年07月09日 06:42:30 | taleinat | set | messages: + msg347523 |
| 2019年07月08日 17:58:37 | terry.reedy | set | nosy:
+ taleinat, cheryl.sabella messages: + msg347502 |
| 2019年07月08日 09:04:15 | cheryl.sabella | set | status: open -> closed superseder: IDLE editor line numbers resolution: duplicate stage: resolved |
| 2017年06月14日 09:16:47 | louielu | set | pull_requests: + pull_request2233 |
| 2017年06月14日 09:14:41 | louielu | create | |