Fixed an issue in the Pygments based lexer. 5_0_x

Wed, 20 Oct 2010 08:40:46 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 20 Oct 2010 08:40:46 +0200
branch
5_0_x
changeset 685
614babee9ae9
parent 683
df9541c07045
child 691
e4b2b0a27b4c

Fixed an issue in the Pygments based lexer.

QScintilla/Lexers/LexerPygments.py file | annotate | diff | comparison | revisions
diff -r df9541c07045 -r 614babee9ae9 QScintilla/Lexers/LexerPygments.py
--- a/QScintilla/Lexers/LexerPygments.py	Sat Oct 16 21:01:28 2010 +0200
+++ b/QScintilla/Lexers/LexerPygments.py	Wed Oct 20 08:40:46 2010 +0200
@@ -376,7 +376,7 @@
             for token, txt in self.__lexer.get_tokens(text):
                 style = TOKEN_MAP.get(token, PYGMENTS_DEFAULT)
                 
-                tlen = len(txt)
+                tlen = len(txt.encode('utf-8'))
                 if eolLen > 1:
                     tlen += txt.count('\n')
                 if tlen:

eric ide

mercurial