Fixed an issue in the editor causing a traceback when setting a language for an empty editor.

Wed, 11 Mar 2015 18:25:37 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 11 Mar 2015 18:25:37 +0100
changeset 4170
8bc578136279
parent 4166
ef803911f553
child 4172
4f20dba37ab6

Fixed an issue in the editor causing a traceback when setting a language for an empty editor.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
diff -r ef803911f553 -r 8bc578136279 QScintilla/Editor.py
--- a/QScintilla/Editor.py	Tue Mar 10 20:20:46 2015 +0100
+++ b/QScintilla/Editor.py	Wed Mar 11 18:25:37 2015 +0100
@@ -1508,7 +1508,8 @@
                 language = Preferences.getEditorLexerAssoc(basename)
             if not language:
                 bindName = self.__bindName(self.text(0))
-                language = Preferences.getEditorLexerAssoc(bindName)
+                if bindName:
+                    language = Preferences.getEditorLexerAssoc(bindName)
             if language == "Python":
                 # correction for Python
                 pyVer = Utilities.determinePythonVersion(

eric ide

mercurial