public void AddMarker (DocumentLine line, TextLineMarker marker, bool commitUpdate) { if (line == null || marker == null) return; if (marker is IExtendingTextLineMarker) { lock (extendingTextMarkers) { HeightChanged = true; extendingTextMarkers.Add (marker); extendingTextMarkers.Sort (CompareMarkers); } } line.AddMarker (marker); OnMarkerAdded (new TextMarkerEvent (line, marker)); if (commitUpdate) this.CommitLineUpdate (line); }