/// <summary>
 /// Creates a new instance of <see cref="BookmarkManager"/>
 /// </summary>
 /// <param name="document">The document.</param>
 /// <param name="lineTracker">The line tracker.</param>
 internal BookmarkManager(IDocument document, LineManager lineTracker)
 {
   this.document = document;
   lineTracker.LineDeleted += delegate(object sender, LineEventArgs e)
   {
     for (int i = 0; i < bookmark.Count; i++)
     {
       Bookmark b = bookmark[i];
       if (b.Line == e.LineSegment)
       {
         bookmark.RemoveAt(i--);
         OnRemoved(new BookmarkEventArgs(b));
       }
     }
   };
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomLineManager"/> class.
 /// </summary>
 /// <param name="lineTracker">The line tracker.</param>
 public CustomLineManager(LineManager lineTracker)
 {
   lineTracker.LineCountChanged += MoveIndices;
 }