mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
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.
This commit is contained in:
parent
b18563da88
commit
32fd874afe
1 changed files with 2 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue