diff options
author | terryjreedy <tjreedy@udel.edu> | 2017-06-14 19:43:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-14 19:43:15 (GMT) |
commit | 32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02 (patch) | |
tree | eb802795c34b65baa21a0316adbd274a58f0f036 | |
parent | b18563da8803433509e9a0e29718e0271014659f (diff) | |
download | cpython-32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02.zip cpython-32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02.tar.gz cpython-32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02.tar.bz2 |
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.
-rw-r--r-- | Lib/idlelib/autocomplete_w.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/autocomplete_w.py b/Lib/idlelib/autocomplete_w.py index e7354d0..7c3138f 100644 --- a/Lib/idlelib/autocomplete_w.py +++ b/Lib/idlelib/autocomplete_w.py @@ -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", |