Created on 2018-06-04 05:54 by terry.reedy, last changed 2018-06-08 05:51 by terry.reedy. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 7411 | merged | cheryl.sabella, 2018-06-04 23:26 | |
| PR 7515 | merged | miss-islington, 2018-06-08 05:22 | |
| PR 7516 | merged | miss-islington, 2018-06-08 05:23 | |
| Messages (6) | |||
|---|---|---|---|
| msg318636 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2018-06-04 05:54 | |
Item 8. on #33610. Clicking on a line in the context box jumps the editor to that line, displayed as the first line. If we do item 11, replace Label with Text, this has to start after #33763 is merged. We could determine the context line clicked from click event.y by using .dlineinfo('1.0') on the editor window to get the offset and height of textlines for the font used. Disabled texts still have an 'insert' mark that is moved by clicks. It is just not visible. The line clicked on is int(self.context.index('insert').split('.')[0]), or int(float(index('insert'))), or next(map(int, t.index('insert').split('.'))), or s=t.index('insert'); int(s[:s.find('.')]) the same as if the context were 'normal' with a visible cursor. This only works if the default click handler fires first, so the mark is moved before we look at it. The default handler is a class binding to Button (press), so we should just be able to bind to ButtonRelease, which is generally a better choice anyway "because if the user accidentally presses the button, they can move the mouse off the widget to avoid setting off the event." |
|||
| msg318702 - (view) | Author: Cheryl Sabella (cheryl.sabella) * | Date: 2018-06-04 20:48 | |
I'll try to have a PR for this by later today. |
|||
| msg318710 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2018-06-04 21:50 | |
Great. I might try some timing experiments later. I have seen both of the first 2 options above in use. |
|||
| msg319019 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2018-06-08 05:21 | |
New changeset 041272b657867f5bec925b19aabf23944125d49b by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-33768: IDLE: Clicking on code context line moves it to top of editor (GH-7411) https://github.com/python/cpython/commit/041272b657867f5bec925b19aabf23944125d49b |
|||
| msg319021 - (view) | Author: miss-islington (miss-islington) | Date: 2018-06-08 05:50 | |
New changeset a4868473e7a0487bd882531490ff8856b952f9b3 by Miss Islington (bot) in branch '3.7': bpo-33768: IDLE: Clicking on code context line moves it to top of editor (GH-7411) https://github.com/python/cpython/commit/a4868473e7a0487bd882531490ff8856b952f9b3 |
|||
| msg319022 - (view) | Author: miss-islington (miss-islington) | Date: 2018-06-08 05:51 | |
New changeset 1038669769208fc05c9a565fbf575f5fa8e9ef61 by Miss Islington (bot) in branch '3.6': bpo-33768: IDLE: Clicking on code context line moves it to top of editor (GH-7411) https://github.com/python/cpython/commit/1038669769208fc05c9a565fbf575f5fa8e9ef61 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-06-08 05:51:45 | terry.reedy | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-06-08 05:51:01 | miss-islington | set | messages: + msg319022 |
| 2018-06-08 05:50:39 | miss-islington | set | nosy:
+ miss-islington messages: + msg319021 |
| 2018-06-08 05:23:25 | miss-islington | set | pull_requests: + pull_request7144 |
| 2018-06-08 05:22:33 | miss-islington | set | pull_requests: + pull_request7143 |
| 2018-06-08 05:21:23 | terry.reedy | set | messages: + msg319019 |
| 2018-06-04 23:26:15 | cheryl.sabella | set | keywords:
+ patch stage: test needed -> patch review pull_requests: + pull_request7036 |
| 2018-06-04 21:50:35 | terry.reedy | set | messages: + msg318710 |
| 2018-06-04 20:48:10 | cheryl.sabella | set | messages: + msg318702 |
| 2018-06-04 05:55:37 | terry.reedy | set | nosy:
+ cheryl.sabella dependencies: + IDLE: Use text widget for code context instead of label widget |
| 2018-06-04 05:54:31 | terry.reedy | create | |