QScintilla/Editor.py

changeset 730
772666a0a05d
parent 728
3ee110082fb7
child 741
137cc6344b48
equal deleted inserted replaced
729:090203934c19 730:772666a0a05d
4606 for handle in list(self.syntaxerrors.keys()): 4606 for handle in list(self.syntaxerrors.keys()):
4607 if self.markerLine(handle) == line: 4607 if self.markerLine(handle) == line:
4608 errorAnnotations.append( 4608 errorAnnotations.append(
4609 self.trUtf8("Error: {0}").format(self.syntaxerrors[handle])) 4609 self.trUtf8("Error: {0}").format(self.syntaxerrors[handle]))
4610 4610
4611 wLen = len(warningAnnotations)
4612 eLen = len(errorAnnotations)
4611 annotations = [] 4613 annotations = []
4612 if len(warningAnnotations): 4614
4615 if wLen:
4613 annotationWarningTxt = "\n".join(warningAnnotations) 4616 annotationWarningTxt = "\n".join(warningAnnotations)
4614 if len(errorAnnotations) > 0: 4617 if eLen:
4615 annotationWarningTxt += "\n" 4618 annotationWarningTxt += "\n"
4616 annotations.append(QsciStyledText(annotationWarningTxt, 4619 annotations.append(QsciStyledText(annotationWarningTxt,
4617 self.annotationWarningStyle)) 4620 self.annotationWarningStyle))
4618 4621
4619 if len(errorAnnotations) > 0: 4622 if eLen:
4620 annotationErrorTxt = "\n".join(errorAnnotations) 4623 annotationErrorTxt = "\n".join(errorAnnotations)
4621 annotations.append(QsciStyledText(annotationErrorTxt, 4624 annotations.append(QsciStyledText(annotationErrorTxt,
4622 self.annotationErrorStyle)) 4625 self.annotationErrorStyle))
4623 4626
4624 if annotations: 4627 if annotations:

eric ide

mercurial