Wed, 05 Jan 2011 16:21:11 +0100
Fixed an issue with the editor not activating the correct typing completer in some situations.
--- a/QScintilla/Editor.py Sun Jan 02 10:28:00 2011 +0100 +++ b/QScintilla/Editor.py Wed Jan 05 16:21:11 2011 +0100 @@ -1416,6 +1416,13 @@ filename = os.path.basename(filename) apiLanguage = Preferences.getEditorLexerAssoc(filename) + if apiLanguage == "": + if self.isPyFile(): + apiLanguage = "Python2" + elif self.isPy3File(): + apiLanguage = "Python3" + elif self.isRubyFile(): + apiLanguage = "Ruby" self.completer = TypingCompleters.getCompleter(apiLanguage, self)
--- a/QScintilla/Lexers/__init__.py Sun Jan 02 10:28:00 2011 +0100 +++ b/QScintilla/Lexers/__init__.py Wed Jan 05 16:21:11 2011 +0100 @@ -117,7 +117,7 @@ """ if not pyname: try: - if language in ["Python", "Python3"]: + if language in ["Python", "Python2", "Python3"]: from .LexerPython import LexerPython return LexerPython(parent) elif language == "C++":
--- a/QScintilla/TypingCompleters/__init__.py Sun Jan 02 10:28:00 2011 +0100 +++ b/QScintilla/TypingCompleters/__init__.py Wed Jan 05 16:21:11 2011 +0100 @@ -17,7 +17,7 @@ @return reference to the instanciated lexer object (QsciLexer) """ try: - if language == "Python": + if language in ["Python", "Python2", "Python3"]: from .CompleterPython import CompleterPython return CompleterPython(editor, parent) elif language == "Ruby":