[Python-checkins] r58306 - python/trunk/Lib/idlelib/AutoComplete.py python/trunk/Lib/idlelib/AutoCompleteWindow.py
kurt.kaiser
python-checkins at python.org
Thu Oct 4 03:49:54 CEST 2007
Author: kurt.kaiser
Date: Thu Oct 4 03:49:54 2007
New Revision: 58306
Modified:
python/trunk/Lib/idlelib/AutoComplete.py
python/trunk/Lib/idlelib/AutoCompleteWindow.py
Log:
Assume that the user knows when he wants to end the line; don't insert
something he didn't select or complete.
Modified: python/trunk/Lib/idlelib/AutoComplete.py
==============================================================================
--- python/trunk/Lib/idlelib/AutoComplete.py (original)
+++ python/trunk/Lib/idlelib/AutoComplete.py Thu Oct 4 03:49:54 2007
@@ -27,7 +27,7 @@
menudefs = [
('edit', [
- ("Show completions", "<<force-open-completions>>"),
+ ("Show Completions", "<<force-open-completions>>"),
])
]
Modified: python/trunk/Lib/idlelib/AutoCompleteWindow.py
==============================================================================
--- python/trunk/Lib/idlelib/AutoCompleteWindow.py (original)
+++ python/trunk/Lib/idlelib/AutoCompleteWindow.py Thu Oct 4 03:49:54 2007
@@ -283,20 +283,9 @@
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",
More information about the Python-checkins
mailing list