Index: AutoComplete.py =================================================================== --- AutoComplete.py (revision 60870) +++ AutoComplete.py (working copy) @@ -23,6 +23,12 @@ # These constants represent the two different types of completions COMPLETE_ATTRIBUTES, COMPLETE_FILES = range(1, 2+1) +# Use 'char in SEPS' to check for both os.sep and os.altsep (if relevant) +# to ensure proper completion of file names +SEPS = os.sep +if os.altsep: # os.altsep is None if irrelevant + SEPS += os.altsep + class AutoComplete: menudefs = [ @@ -71,7 +77,7 @@ if lastchar == ".": self._open_completions_later(False, False, False, COMPLETE_ATTRIBUTES) - elif lastchar == os.sep: + elif lastchar in SEPS: self._open_completions_later(False, False, False, COMPLETE_FILES) @@ -127,7 +133,7 @@ i -= 1 comp_start = curline[i:j] j = i - while i and curline[i-1] in FILENAME_CHARS+os.sep: + while i and curline[i-1] in FILENAME_CHARS+SEPS: i -= 1 comp_what = curline[i:j] elif hp.is_in_code() and (not mode or mode==COMPLETE_ATTRIBUTES):