Refactor and fix keybinding issue (fixes #447)#451
Merged
sebastinas merged 3 commits intobpython:masterfrom Jan 22, 2015
keyan:bug447
Merged
Refactor and fix keybinding issue (fixes #447)#451sebastinas merged 3 commits intobpython:masterfrom keyan:bug447
sebastinas merged 3 commits intobpython:masterfrom
keyan:bug447
Conversation
This changes the logic for the function get_key_no_doublebind() and removes the mutable list which was previously used to keep track of keybindings which were already used. Although this fix passes the test cases and the specific case mentioned in #447, the behavior is such that specifying the same custom keybinding for two commands will result in only one command being bound.
Contributor
Author
|
Thanks Sebastian, so I'm having an issue passing the |
Contributor
Author
|
Fixed the merge conflicts and also passes the new tests. The issue was that |
sebastinas
added a commit
that referenced
this pull request
Jan 22, 2015
Refactor and fix keybinding issue (fixes #447)
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.
This changes the logic for the function
get_key_no_doublebind()and removes the mutable list which was previously used to keep track of keybindings which were already assigned. Although this fix passes the test cases and the specific case mentioned in #447, the logic is such that specifying the same custom keybinding for two commands will result in only one command being bound. Also I am getting 12 skipped tests when running nosetests, any ideas why this is happening?With:
help = F9show_source = F9F9 is mapped to
show_sourceandhelpis not mapped to any key. I think this is because the keybindings are assigned sequentially so becauseshow_sourceis assigned first (line 182) vshelp(line 210).I think this is still a substantial improvement over the old code because it is easier to understand and has more functionality than before. Although the problem of correctly handling custom keybinding is not completely resolved. Knowing the exact desired functionality would be helpful though.