6004 @return list of line numbers containg a VCS conflict marker |
6004 @return list of line numbers containg a VCS conflict marker |
6005 @rtype list of int |
6005 @rtype list of int |
6006 """ |
6006 """ |
6007 conflictMarkerLines = [] |
6007 conflictMarkerLines = [] |
6008 |
6008 |
6009 for searchRe in Editor.VcsConflictMarkerLineRegExpList: |
6009 regExp = re.compile("|".join(Editor.VcsConflictMarkerLineRegExpList), |
6010 ok = self.findFirstTarget(searchRe, True, False, False, 0, 0) |
6010 re.MULTILINE) |
6011 while ok: |
6011 matches = [m for m in regExp.finditer(self.text())] |
6012 spos = self.getFoundTarget()[0] |
6012 for match in matches: |
6013 line = self.lineIndexFromPosition(spos)[0] |
6013 line, _ = self.lineIndexFromPosition(match.start()) |
6014 conflictMarkerLines.append(line) |
6014 conflictMarkerLines.append(line) |
6015 |
|
6016 ok = self.findNextTarget() |
|
6017 |
6015 |
6018 return conflictMarkerLines |
6016 return conflictMarkerLines |
6019 |
6017 |
6020 ########################################################################### |
6018 ########################################################################### |
6021 ## Warning handling methods below |
6019 ## Warning handling methods below |