QScintilla/Editor.py

changeset 448
a1f1b226ff4b
parent 429
dcc623c99907
child 460
6a3899e91d76
--- a/QScintilla/Editor.py	Sat Jul 31 18:58:43 2010 +0200
+++ b/QScintilla/Editor.py	Sun Aug 01 13:05:08 2010 +0200
@@ -2551,7 +2551,8 @@
         if wc is None or not useWordChars:
             regExp = QRegExp('[^\w_]', cs)
         else:
-            regExp = QRegExp('[^{0}]'.format(re.escape(wc)), cs)
+            wc = re.sub('\w', "", wc)
+            regExp = QRegExp('[^\w{0}]'.format(re.escape(wc)), cs)
         start = regExp.lastIndexIn(text, index) + 1
         end = regExp.indexIn(text, index)
         if start == end + 1 and index > 0:

eric ide

mercurial