QScintilla/Editor.py

branch
maintenance
changeset 6602
331ac8f99cf8
parent 6518
926d65bd23b8
parent 6571
feb72cfc7807
child 6646
51eefa621de4
diff -r 06e7d2941ead -r 331ac8f99cf8 QScintilla/Editor.py
--- a/QScintilla/Editor.py	Thu Nov 01 11:48:02 2018 +0100
+++ b/QScintilla/Editor.py	Sat Dec 01 11:44:34 2018 +0100
@@ -6006,14 +6006,12 @@
         """
         conflictMarkerLines = []
         
-        for searchRe in Editor.VcsConflictMarkerLineRegExpList:
-            ok = self.findFirstTarget(searchRe, True, False, False, 0, 0)
-            while ok:
-                spos = self.getFoundTarget()[0]
-                line = self.lineIndexFromPosition(spos)[0]
-                conflictMarkerLines.append(line)
-                
-                ok = self.findNextTarget()
+        regExp = re.compile("|".join(Editor.VcsConflictMarkerLineRegExpList),
+                            re.MULTILINE)
+        matches = [m for m in regExp.finditer(self.text())]
+        for match in matches:
+            line, _ = self.lineIndexFromPosition(match.start())
+            conflictMarkerLines.append(line)
         
         return conflictMarkerLines
     

eric ide

mercurial