QScintilla/Editor.py

changeset 6247
5c677a7f7d51
parent 6210
f5b392aac28e
child 6273
0daf79d65080
child 6278
13fd8759f981
--- a/QScintilla/Editor.py	Fri Apr 13 22:32:32 2018 +0200
+++ b/QScintilla/Editor.py	Sat Apr 14 15:08:24 2018 +0200
@@ -3399,10 +3399,10 @@
             cs = Qt.CaseInsensitive
         wc = self.wordCharacters()
         if wc is None or not useWordChars:
-            regExp = QRegExp('[^\w_]', cs)
-        else:
-            wc = re.sub('\w', "", wc)
-            regExp = QRegExp('[^\w{0}]'.format(re.escape(wc)), cs)
+            regExp = QRegExp(r'[^\w_]', cs)
+        else:
+            wc = re.sub(r'\w', "", wc)
+            regExp = QRegExp(r'[^\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:
@@ -4691,7 +4691,7 @@
     ## auto-completion hook interfaces
     #################################################################
     
-    def addCompletionListHook(self, key, func, async=False):
+    def addCompletionListHook(self, key, func, asynchroneous=False):
         """
         Public method to set an auto-completion list provider.
         
@@ -4704,7 +4704,7 @@
         @type function(editor, bool) -> list of str in case async is False
             and function(editor, bool, str) returning nothing in case async
             is True
-        @param async flag indicating an asynchroneous function
+        @param asynchroneous flag indicating an asynchroneous function
         @type bool
         """
         if key in self.__completionListHookFunctions or \
@@ -4725,7 +4725,7 @@
             self.SCN_CHARADDED.connect(self.__charAdded)
             self.SCN_AUTOCCANCELLED.connect(self.__autocompletionCancelled)
         
-        if async:
+        if asynchroneous:
             self.__completionListAsyncHookFunctions[key] = func
         else:
             self.__completionListHookFunctions[key] = func

eric ide

mercurial