QScintilla/Lexers/LexerPygments.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
diff -r b0996e4a289e -r 1d8dd9706f46 QScintilla/Lexers/LexerPygments.py
--- a/QScintilla/Lexers/LexerPygments.py	Fri Jan 01 16:11:36 2010 +0000
+++ b/QScintilla/Lexers/LexerPygments.py	Sat Jan 02 15:11:35 2010 +0000
@@ -50,7 +50,7 @@
 PYGMENTS_HEADING, \
 PYGMENTS_SUBHEADING, \
 PYGMENTS_DELETED, \
-PYGMENTS_INSERTED           = range(32)
+PYGMENTS_INSERTED           = list(range(32))
 # 32 to 39 are reserved for QScintilla internal styles
 PYGMENTS_GENERIC_ERROR, \
 PYGMENTS_EMPHASIZE, \
@@ -58,7 +58,7 @@
 PYGMENTS_PROMPT, \
 PYGMENTS_OUTPUT, \
 PYGMENTS_TRACEBACK, \
-PYGMENTS_ERROR              = range(40, 47)
+PYGMENTS_ERROR              = list(range(40, 47))
 
 #-----------------------------------------------------------------------------#
 
@@ -343,7 +343,8 @@
         if self.editor is None:
             return True
         
-        text = self.editor.text().encode('utf-8')
+##        text = self.editor.text().encode('utf-8')
+        text = self.editor.text()
         self.__lexer = self.__guessLexer(text)
         
         return self.__lexer is not None
@@ -366,7 +367,8 @@
         @param start position of first character to be styled (integer)
         @param end position of last character to be styled (integer)
         """
-        text = self.editor.text()[:end + 1].encode('utf-8')
+##        text = self.editor.text()[:end + 1].encode('utf-8')
+        text = self.editor.text()[:end + 1]
         self.__lexer = self.__guessLexer(text)
         
         cpos = 0

eric ide

mercurial