Commit 2fbad0e9 authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

Assume that the user knows when he wants to end the line; don't insert

something he didn't select or complete.
Backport r58306
parent 60d9f8df
......@@ -27,7 +27,7 @@ class AutoComplete:
menudefs = [
('edit', [
("Show completions", "<<force-open-completions>>"),
("Show Completions", "<<force-open-completions>>"),
])
]
......
......@@ -274,18 +274,7 @@ 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:
elif keysym == "Return":
self.hide_window()
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment