summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2007-10-04 01:49:54 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2007-10-04 01:49:54 (GMT)
commit67bd62fd6cda77f5c315e1e77b54fa92c024f7bf (patch)
tree0ad6eba26fa139d9cdec32370d5843685aa1954a /Lib/idlelib
parent50e90e265fc3205fc6cc0193d3cebe08e9859b0a (diff)
downloadcpython-67bd62fd6cda77f5c315e1e77b54fa92c024f7bf.zip
cpython-67bd62fd6cda77f5c315e1e77b54fa92c024f7bf.tar.gz
cpython-67bd62fd6cda77f5c315e1e77b54fa92c024f7bf.tar.bz2
Assume that the user knows when he wants to end the line; don't insert
something he didn't select or complete.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/AutoComplete.py2
-rw-r--r--Lib/idlelib/AutoCompleteWindow.py17
2 files changed, 4 insertions, 15 deletions
diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py
index 7085386..e1549be 100644
--- a/Lib/idlelib/AutoComplete.py
+++ b/Lib/idlelib/AutoComplete.py
@@ -27,7 +27,7 @@ class AutoComplete:
menudefs = [
('edit', [
- ("Show completions", "<<force-open-completions>>"),
+ ("Show Completions", "<<force-open-completions>>"),
])
]
diff --git a/Lib/idlelib/AutoCompleteWindow.py b/Lib/idlelib/AutoCompleteWindow.py
index dfe5f30..f7bd423 100644
--- a/Lib/idlelib/AutoCompleteWindow.py
+++ b/Lib/idlelib/AutoCompleteWindow.py
@@ -283,20 +283,9 @@ class AutoCompleteWindow:
self._selection_changed()
return "break"
- elif keysym == "Return" and not state:
- # If start is a prefix of the selection, or there was an indication
- # that the user used the completion window, put the selected
- # completion in the text, and close the list.
- # Otherwise, close the window and let the event through.
- cursel = int(self.listbox.curselection()[0])
- if self.completions[cursel][:len(self.start)] == self.start or \
- self.userwantswindow:
- self._change_start(self.completions[cursel])
- self.hide_window()
- return "break"
- else:
- self.hide_window()
- return
+ elif keysym == "Return":
+ self.hide_window()
+ return
elif (self.mode == AutoComplete.COMPLETE_ATTRIBUTES and keysym in
("period", "space", "parenleft", "parenright", "bracketleft",