-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-39781: Do not jump when select in IDLE codecontext #18683
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
Conversation
and use lesser weight single quotes.
I think that this is ready to merge (tomorrow). The main problem I had is that 'sel' is a tag for some purposes, like tag_add, but tag_prevrange('sel', '1.0') returns an empty tuple even when there is a selection. After failing to make it work, I found a solution in EditorWindow.get_selection_indices. Text.selection_get also works (and also raises TclError when no selection). |
""" | ||
try: | ||
self.context.index("sel.first") | ||
except tkinter.TclError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything after this is the old code indented.
Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
GH-18688 is a backport of this pull request to the 3.8 branch. |
GH-18689 is a backport of this pull request to the 3.7 branch. |
Previously, the button-up part of selecting with a mouse was treated as a click that meant 'jump' to this line, which modified the context and undid the selection (cherry picked from commit c705fd1) Co-authored-by: Terry Jan Reedy <[email protected]>
Previously, the button-up part of selecting with a mouse was treated as a click that meant 'jump' to this line, which modified the context and undid the selection (cherry picked from commit c705fd1) Co-authored-by: Terry Jan Reedy <[email protected]>
Previously, the button-up part of selecting with a mouse was treated as a click that meant 'jump' to this line, which modified the context and undid the selection (cherry picked from commit c705fd1) Co-authored-by: Terry Jan Reedy <[email protected]>
bpo-39781: Do not jump when select in IDLE codecontext (pythonGH-18683)
Previously, the button-up part of selecting with a mouse was treated as a click
that meant 'jump' to this line, which modified the context and undid the selection
https://bugs.python.org/issue39781