summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/AutoCompleteWindow.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-09-11 19:49:06 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-09-11 19:49:06 (GMT)
commite03c74a1b6ac4cebc6688843dd32ba03c49ea492 (patch)
tree84ed0fd2ef7f0a979718dcf5f7bd872a134e0583 /Lib/idlelib/AutoCompleteWindow.py
parentb65685f3f22d66e4f99abccf56ec54cdcce36c04 (diff)
downloadcpython-e03c74a1b6ac4cebc6688843dd32ba03c49ea492.zip
cpython-e03c74a1b6ac4cebc6688843dd32ba03c49ea492.tar.gz
cpython-e03c74a1b6ac4cebc6688843dd32ba03c49ea492.tar.bz2
Issue #18988: The "Tab" key now works when a word is already autocompleted.
Diffstat (limited to 'Lib/idlelib/AutoCompleteWindow.py')
-rw-r--r--Lib/idlelib/AutoCompleteWindow.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/AutoCompleteWindow.py b/Lib/idlelib/AutoCompleteWindow.py
index 298177f..27b0e56 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