Conversation
This removes three key bindings from the key configuration mechanism, which are required to always be bound to specific keys for IDLE to behave properly: * '<<smart-backspace>>': ['<Key-BackSpace>'], * '<<newline-and-indent>>': ['<Key-Return>', '<Key-KP_Enter>'], * '<<smart-indent>>': ['<Key-Tab>'], Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
terryjreedy
reviewed
Jun 2, 2021
terryjreedy
left a comment
Member
There was a problem hiding this comment.
I would like to merge the code and .def changes as are but am not quite sure that we should. See comment on the issue.
Comment on lines
+302
to
+303
| # Bind keys to pseudoevents for non-configurable key-specific handlers. | ||
| text.event_add('<<smart-backspace>>', '<Key-BackSpace>') |
Member
There was a problem hiding this comment.
The only function reason to keep these fixed keys separate from those that follow is that the pseudoevent -- handler bindings are done above for these and below for the existing fixed key keys. And this is related to where the handler are defined. So keep the separation for now.
Contributor
|
This missed the boat for inclusion in Python 3.9 which accepts security fixes only as of today. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Alternative PR to GH-26403.)
The underlying issue causing tab-completion to be broken after using the config dialog: Two events are bound to
<Key-Tab>:<<smart-indent>>and<<autocomplete>>. The order these are bound is important: The binding to<<autocomplete>>must be done last so that it will be invoked first. The current bug is that<<smart-indent>>is unbound and then bound again by the config dialog, which changes the order and breaks tab-completion.This PR removes three key bindings from the key configuration mechanism, which are required to always be bound to specific keys for IDLE to behave properly:
I manually verified that having a
config-keys.cfgfile in.idlercwith those keys defined in it doesn't cause any issues after this change is made. (IdleConf.GetCoreKeys()is written in a way that ensures this.)