--- a/eric6/QScintilla/Editor.py Sun Apr 11 11:34:32 2021 +0200 +++ b/eric6/QScintilla/Editor.py Sun Apr 11 12:38:16 2021 +0200 @@ -2849,9 +2849,7 @@ self.__hasTaskMarkers = False # now search tasks and record them - lineIndex = -1 - for line in txtList: - lineIndex += 1 + for lineIndex, line in enumerate(txtList): shouldBreak = False if line.endswith("__NO-TASK__"):