diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-09-11 22:48:52 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-09-11 22:48:52 +0300 |
commit | fa7d3b13a36ec0ed72aa2d838299ceb8bc5eedca (patch) | |
tree | 0d824ecbb23cc2de503357e6214092a0dd1375ba | |
parent | f27623215cbcb1cc23acfd6d2e2e7b3d5b3f994c (diff) | |
parent | dd4754e6a8760d70db1853855c5f6f0f8c1b1f1b (diff) | |
download | cpython-git-fa7d3b13a36ec0ed72aa2d838299ceb8bc5eedca.tar.gz |
Issue #18988: The "Tab" key now works when a word is already autocompleted.
-rw-r--r-- | Lib/idlelib/AutoComplete.py | 9 | ||||
-rw-r--r-- | Lib/idlelib/AutoCompleteWindow.py | 3 | ||||
-rw-r--r-- | Misc/NEWS | 5 |
3 files changed, 10 insertions, 7 deletions
diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py index 929d3581c9..f3660307d3 100644 --- a/Lib/idlelib/AutoComplete.py +++ b/Lib/idlelib/AutoComplete.py @@ -160,12 +160,9 @@ class AutoComplete: if not comp_lists[0]: return self.autocompletewindow = self._make_autocomplete_window() - self.autocompletewindow.show_window(comp_lists, - "insert-%dc" % len(comp_start), - complete, - mode, - userWantsWin) - return True + return not self.autocompletewindow.show_window( + comp_lists, "insert-%dc" % len(comp_start), + complete, mode, userWantsWin) def fetch_completions(self, what, mode): """Return a pair of lists of completions for something. The first list diff --git a/Lib/idlelib/AutoCompleteWindow.py b/Lib/idlelib/AutoCompleteWindow.py index 7787e7034c..f666ea628b 100644 --- a/Lib/idlelib/AutoCompleteWindow.py +++ b/Lib/idlelib/AutoCompleteWindow.py @@ -157,13 +157,14 @@ class AutoCompleteWindow: self.start = self.widget.get(self.startindex, "insert") if complete: completed = self._complete_string(self.start) + start = self.start self._change_start(completed) i = self._binary_search(completed) if self.completions[i] == completed and \ (i == len(self.completions)-1 or self.completions[i+1][:len(completed)] != completed): # There is exactly one matching completion - return + return completed == start self.userwantswindow = userWantsWin self.lasttypedstart = self.start @@ -21,6 +21,11 @@ Tests test.support was converted to a package. Regression noticed by Zachary Ware. +IDLE +---- + +- Issue #18988: The "Tab" key now works when a word is already autocompleted. + What's New in Python 3.4.0 Alpha 2? =================================== |