anchor.diff:                      |> Seq.distinctBy fst
                       |> Seq.toArray
               
  -                if markerData <> data then
  -                    do! Async.SwitchToContext ctx
  -                    markerData <- data
  -                    children.Clear()
  -                    let totalLines = textView.TextSnapshot.LineCount
  -                    let virtualAdditionalLines = int (textView.ViewportHeight / textView.LineHeight) - 1
  -                    let lineHeight = textView.ViewportHeight / float (totalLines + virtualAdditionalLines)
  -                    for (lineNo, pos) in markerData do               
  -                        let markerHeight = 3.0
  -                        let markerMargin = 2.0
  -                        // Ensure that marker with is non-negative, otherwise Rectangle.Width throws ArgumentException.
  -                        let markerWidth = max 3.0 (verticalScrollBar.MarginSize - markerMargin * 2.0)
  -                        let marker = Rectangle(Fill = Brushes.Orange, StrokeThickness = 0.5, Stroke = markerBrush,
  -                                               Height = markerHeight, Width = markerWidth,
  -                                               Cursor = Cursors.Hand, ToolTip = sprintf "Unused declaration(s) at line %i" (lineNo + 1))
  -                        // Try to place the marker on top of vertical scroll bar
  -                        Canvas.SetLeft(marker, - (markerWidth + markerMargin))
  -                        Canvas.SetTop(marker, float lineNo * lineHeight)
  -                        marker.MouseDown.Add(fun _ -> 
  -                            let line = textView.TextSnapshot.GetLineFromLineNumber(lineNo)
  -                            textView.Caret.MoveTo(VirtualSnapshotPoint(textView.TextSnapshot, pos)) |> ignore
  -                            textView.ViewScroller.EnsureSpanVisible(SnapshotSpan(line.Start, 0), EnsureSpanVisibleOptions.ShowStart))
  -                        children.Add(marker) |> ignore
  +                do! Async.SwitchToContext ctx
  +                markerData <- data
  +                children.Clear()
  +                let verticalScrollBar = verticalScrollMargin :?> IVerticalScrollBar
  +                let lineStart = verticalScrollBar.TrackSpanTop
  +                let totalLines = textView.TextSnapshot.LineCount
  +                let lineHeight = verticalScrollBar.TrackSpanHeight / float totalLines
  +                for (lineNo, pos) in markerData do               
  +                    let markerHeight = 3.0
  +                    let markerMargin = 2.0
  +                    // Ensure that marker with is non-negative, otherwise Rectangle.Width throws ArgumentException.
  +                    let markerWidth = max 3.0 (verticalScrollMargin.MarginSize - markerMargin * 2.0)
  +                    let marker = Rectangle(Fill = Brushes.Orange, StrokeThickness = 0.5, Stroke = markerBrush,
  +                                            Height = markerHeight, Width = markerWidth,
  +                                            Cursor = Cursors.Hand, ToolTip = sprintf "Unused declaration(s) at line %i" (lineNo + 1))
  +                    // Try to place the marker on top of vertical scroll bar
  +                    Canvas.SetLeft(marker, - (markerWidth + markerMargin))
  +                    Canvas.SetTop(marker, lineStart + float lineNo * lineHeight)
  +                    marker.MouseDown.Add(fun _ -> 
  +                        let line = textView.TextSnapshot.GetLineFromLineNumber(lineNo)
  +                        textView.Caret.MoveTo(VirtualSnapshotPoint(textView.TextSnapshot, pos)) |> ignore
  +                        textView.ViewScroller.EnsureSpanVisible(SnapshotSpan(line.Start, 0), EnsureSpanVisibleOptions.ShowStart))
  +                    children.Add(marker) |> ignore
               } |> Async.StartInThreadPoolSafe
   
       let docEventListener = new DocumentEventListener ([ViewChange.viewportHeightEvent textView; ViewChange.classificationEvent classifier], 
  
positive.code:     inherit Canvas()
  
      let children = base.Children
      let verticalScrollBar = marginContainer.GetTextViewMargin(PredefinedMarginNames.VerticalScrollBar)
      let mutable markerData = Unchecked.defaultof<_>
      let markerBrush = SolidColorBrush(Color.FromRgb(255uy, 165uy, 0uy))
  
  
negative.code: ﻿namespace FSharpVSPowerTools
  
  open System.Windows
  open System.Windows.Shapes
  open System.Windows.Media
  