QScintilla/Editor.py

branch
maintenance
changeset 6602
331ac8f99cf8
parent 6518
926d65bd23b8
parent 6571
feb72cfc7807
child 6646
51eefa621de4
equal deleted inserted replaced
6570:06e7d2941ead 6602:331ac8f99cf8
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

eric ide

mercurial