QScintilla/TypingCompleters/CompleterPython.py

changeset 6247
5c677a7f7d51
parent 6048
82ad8ec9548c
child 6645
ad476851d7e0
--- a/QScintilla/TypingCompleters/CompleterPython.py	Fri Apr 13 22:32:32 2018 +0200
+++ b/QScintilla/TypingCompleters/CompleterPython.py	Sat Apr 14 15:08:24 2018 +0200
@@ -212,7 +212,7 @@
                 txt = self.editor.text(line - 1)
                 if re.search(":\r?\n", txt) is None:
                     openCount = len(re.findall("[({[]", txt))
-                    closeCount = len(re.findall("[)}\]]", txt))
+                    closeCount = len(re.findall(r"[)}\]]", txt))
                     if openCount > closeCount:
                         openCount = 0
                         closeCount = 0
@@ -222,7 +222,7 @@
                             lastOpenIndex = openList[index].start()
                             txt2 = txt[lastOpenIndex:]
                             openCount = len(re.findall("[({[]", txt2))
-                            closeCount = len(re.findall("[)}\]]", txt2))
+                            closeCount = len(re.findall(r"[)}\]]", txt2))
                             index -= 1
                         if openCount > closeCount and lastOpenIndex > col:
                             self.editor.insert(' ' * (lastOpenIndex - col + 1))

eric ide

mercurial