diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-08-02 20:40:20 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-08-02 20:40:20 (GMT) |
| commit | 4c6daf10372af41d4b48dd1ac65d737c64c2d41c (patch) | |
| tree | 1c09beb9cb50131295da68818734d18e39b1941d /Lib/idlelib/AutoCompleteWindow.py | |
| parent | b55d36805566c092c11b8e38792c759742cd6a1f (diff) | |
| download | cpython-4c6daf10372af41d4b48dd1ac65d737c64c2d41c.zip cpython-4c6daf10372af41d4b48dd1ac65d737c64c2d41c.tar.gz cpython-4c6daf10372af41d4b48dd1ac65d737c64c2d41c.tar.bz2 | |
Merged revisions 79576-79578 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79576 | florent.xicluna | 2010-04-02 10:24:52 +0300 (Fri, 02 Apr 2010) | 2 lines
#7092: Fix additional "-3" warnings in the idlelib package, and convert to absolute imports.
........
r79577 | florent.xicluna | 2010-04-02 11:15:26 +0300 (Fri, 02 Apr 2010) | 2 lines
#7092: Drop the cmp argument.
........
r79578 | florent.xicluna | 2010-04-02 11:30:21 +0300 (Fri, 02 Apr 2010) | 2 lines
#7092: silence some py3k warnings
........
Diffstat (limited to 'Lib/idlelib/AutoCompleteWindow.py')
| -rw-r--r-- | Lib/idlelib/AutoCompleteWindow.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/idlelib/AutoCompleteWindow.py b/Lib/idlelib/AutoCompleteWindow.py index 81eeec1..298177f 100644 --- a/Lib/idlelib/AutoCompleteWindow.py +++ b/Lib/idlelib/AutoCompleteWindow.py @@ -2,8 +2,8 @@ An auto-completion window for IDLE, used by the AutoComplete extension """ from Tkinter import * -from MultiCall import MC_SHIFT -import AutoComplete +from idlelib.MultiCall import MC_SHIFT +from idlelib.AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>" HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>") @@ -264,7 +264,7 @@ class AutoCompleteWindow: if keysym != "Tab": self.lastkey_was_tab = False if (len(keysym) == 1 or keysym in ("underscore", "BackSpace") - or (self.mode==AutoComplete.COMPLETE_FILES and keysym in + or (self.mode == COMPLETE_FILES and keysym in ("period", "minus"))) \ and not (state & ~MC_SHIFT): # Normal editing of text @@ -292,10 +292,10 @@ class AutoCompleteWindow: self.hide_window() return - elif (self.mode == AutoComplete.COMPLETE_ATTRIBUTES and keysym in + elif (self.mode == COMPLETE_ATTRIBUTES and keysym in ("period", "space", "parenleft", "parenright", "bracketleft", "bracketright")) or \ - (self.mode == AutoComplete.COMPLETE_FILES and keysym in + (self.mode == COMPLETE_FILES and keysym in ("slash", "backslash", "quotedbl", "apostrophe")) \ and not (state & ~MC_SHIFT): # If start is a prefix of the selection, but is not '' when @@ -303,7 +303,7 @@ class AutoCompleteWindow: # selected completion. Anyway, close the list. cursel = int(self.listbox.curselection()[0]) if self.completions[cursel][:len(self.start)] == self.start \ - and (self.mode==AutoComplete.COMPLETE_ATTRIBUTES or self.start): + and (self.mode == COMPLETE_ATTRIBUTES or self.start): self._change_start(self.completions[cursel]) self.hide_window() return |
