--- a/QScintilla/Editor.py Thu Mar 27 19:15:18 2014 +0100 +++ b/QScintilla/Editor.py Fri Mar 28 19:52:34 2014 +0100 @@ -5511,9 +5511,9 @@ if error: # set a new syntax error marker markers = self.markersAtLine(line - 1) + index += self.indentation(line - 1) if not (markers & (1 << self.syntaxerror)): handle = self.markerAdd(line - 1, self.syntaxerror) - index += self.indentation(line - 1) self.syntaxerrors[handle] = [(msg, index)] self.syntaxerrorToggled.emit(self) else: