8000 [3.6]bpo-15786: Fix IDLE autocomplete return problem. (#2198) by terryjreedy · Pull Request #2199 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.6]bpo-15786: Fix IDLE autocomplete return problem. (#2198) #2199

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

Merged
merged 1 commit into from
Jun 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
bpo-15786: Fix IDLE autocomplete return problem. (#2198)
Before, <return> would not, for instance, complete 're.c' to 're.compile' even with 'compile' highlighted.  Now it does.  Before, <return> was inserted into text, which in Shell meant compile() and possibly execute.  Now cursor is left after completion.
(cherry picked from commit 32fd874)
  • Loading branch information
terryjreedy committed Jun 14, 2017
commit cf51f45569ecbc2b8f3679ea6792588badc29a09
3 changes: 2 additions & 1 deletion Lib/idlelib/autocomplete_w.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,9 @@ def keypress_event(self, event):
return "break"

elif keysym == "Return":
self.complete()
self.hide_window()
return None
return 'break'

elif (self.mode == COMPLETE_ATTRIBUTES and keysym in
("period", "space", "parenleft", "parenright", "bracketleft",
Expand Down
0