Commit 32fd874a authored by terryjreedy's avatar terryjreedy Committed by GitHub

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.
parent b18563da
......@@ -325,8 +325,9 @@ class AutoCompleteWindow:
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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment