diff options
author | terryjreedy <tjreedy@udel.edu> | 2017-06-14 20:10:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-14 20:10:10 (GMT) |
commit | 6628006941f4382813a9af4628894c99bb333b8f (patch) | |
tree | 200ecc17b8cf3a3a624ed7f91de30e62018aa96e /Lib/idlelib/autocomplete_w.py | |
parent | 789f47ebb56283bd0156957121ac2854817b2bf9 (diff) | |
download | cpython-6628006941f4382813a9af4628894c99bb333b8f.zip cpython-6628006941f4382813a9af4628894c99bb333b8f.tar.gz cpython-6628006941f4382813a9af4628894c99bb333b8f.tar.bz2 |
[3.6]bpo-15786: Fix IDLE autocomplete return problem. (#2198) (#2199)
Before, Enter would not, for instance, complete 're.c' to 're.compile' even with 'compile' highlighted. Now it does. Before, '\n' was inserted into text, which in Shell meant compile() and possibly execute. Now cursor is left after completion.
(cherry picked from commit 32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02)
Diffstat (limited to 'Lib/idlelib/autocomplete_w.py')
-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", |