anchor.diff:      let mutable ranges : SnapshotSpan [] = [||]
   
       let triggerUpdate snapshot newRanges =
  -        ranges <- Array.map (fun x -> rangeToProperOutlineSnapshotSpan snapshot x) newRanges
  -        tagsChanged.Trigger(
  -            self,
  -            SnapshotSpanEventArgs(
  +        try
  +            ranges <- newRanges |> Array.map (fun x ->
  +                rangeToProperOutlineSnapshotSpan snapshot x)
  +            tagsChanged.Trigger(
  +                self,
  +                SnapshotSpanEventArgs(
  +                    SnapshotSpan(
  +                        buffer.CurrentSnapshot,
  +                        0,
  +                        buffer.CurrentSnapshot.Length - 1)))
  +        with
  +            | :? ArgumentOutOfRangeException -> ()
  +
  +    let createTagSpan (ss: SnapshotSpan) =
  +        try
  +            let snapshot = ss.Snapshot
  +            let firstLine = snapshot.GetLineFromPosition(ss.Start.Position)
  +            let firstLineNumber = firstLine.LineNumber
  +            let mutable lastLine = snapshot.GetLineFromPosition(ss.End.Position)
  +
  +            let firstHintLine = snapshot.GetLineFromLineNumber(firstLineNumber + 1)
  +            let nHintLines = lastLine.LineNumber - firstHintLine.LineNumber + 1
  +            if nHintLines > MaxTooltipLines then
  +                lastLine <- snapshot.GetLineFromLineNumber(firstHintLine.LineNumber + MaxTooltipLines - 1)
  +
  +            let hintSnapshotSpan =
                   SnapshotSpan(
  -                    buffer.CurrentSnapshot,
  -                    0,
  -                    buffer.CurrentSnapshot.Length - 1)))
  -
  -    let createTagSpan (ss: SnapshotSpan) =
  -        let snapshot = ss.Snapshot
  -        let firstLineNumber = snapshot.GetLineNumberFromPosition(ss.Start.Position)
  -        let mutable lastLine = snapshot.GetLineFromPosition(ss.End.Position)
  -
  -        let nlines = lastLine.LineNumber - firstLineNumber + 1
  -        if nlines > MaxTooltipLines then
  -            lastLine <- snapshot.GetLineFromLineNumber(firstLineNumber + MaxTooltipLines - 1)
  -
  -        let hintSnapshotSpan = SnapshotSpan(ss.Start, lastLine.End)
  -        let missingLinesCount = Math.Max(nlines - MaxTooltipLines, 0)
  -
  -        let hintText = lazy(
  -            // substring(2) ignores newline
  -            let text = hintSnapshotSpan.GetText().Substring(2)
  -            match missingLinesCount with
  -            | 0 -> text
  -            | n -> text + sprintf "\n+ %d lines..." n
  -        )
  -
  -        TagSpan(
  -            ss,
  -            { new IOutliningRegionTag with
  -                member x.CollapsedForm      = "..." :> obj
  -                member x.CollapsedHintForm  = hintText.Force() :> obj
  -                member x.IsDefaultCollapsed = false
  -                member x.IsImplementation   = false
  -            })
  +                    firstHintLine.Start,
  +                    lastLine.End)
  +
  +            let missingLinesCount = Math.Max(nHintLines - MaxTooltipLines, 0)
  +            let collapsedText = lazy (SnapshotSpan(ss.Start, firstLine.End).GetText() + " ...")
  +
  +            let hintText = lazy(
  +                let text = hintSnapshotSpan.GetText()
  +                match missingLinesCount with
  +                | 0 -> text
  +                | n -> text + sprintf "\n\n +%d lines..." n
  +            )
  +
  +            TagSpan(
  +                ss,
  +                { new IOutliningRegionTag with
  +                    member __.CollapsedForm      = collapsedText.Force() :> obj
  +                    member __.CollapsedHintForm  = hintText.Force() :> obj
  +                    member __.IsDefaultCollapsed = false
  +                    member __.IsImplementation   = false })
  +        with
  +            | :? ArgumentOutOfRangeException -> null
   
       let getTags (nssc: NormalizedSnapshotSpanCollection) =
           if Seq.isEmpty nssc || Array.isEmpty ranges then Seq.empty
  
positive.code: [<Literal>]
  let UpdateDelay = 200us
  [<Literal>]
  let MaxTooltipLines = 30
  
  let visitLetBinding (Binding(_, _, _, _, _, _, _, _, _, _, range, _)) =
      range
  
  let rec visitSynMemberDefn d =
      seq {
          match d with
          | SynMemberDefn.Member _ -> yield d.Range
          | SynMemberDefn.LetBindings(lets, _, _, _) ->
              yield! Seq.map visitLetBinding lets
          | SynMemberDefn.AbstractSlot _ -> yield d.Range
          | SynMemberDefn.Interface(_, mmembers, _) ->
              yield d.Range
              match mmembers with
              | Some members -> yield! Seq.collect visitSynMemberDefn members
              | None -> ()
          | SynMemberDefn.NestedType(nt, _, _) ->
              yield! visitTypeDecl nt
          | _ -> ()
      }
  
  and visitTypeDecl (TypeDefn(_, _, members, range)) =
      seq {
          yield range
          yield! Seq.collect visitSynMemberDefn members
      }
  
  let rec visitDeclaration (decl: SynModuleDecl) = 
      seq {
          match decl with
          | SynModuleDecl.Let(_, bindings, _) ->
              yield decl.Range
              yield! Seq.map visitLetBinding bindings
          | SynModuleDecl.Types(types, _) ->
              yield! Seq.collect visitTypeDecl types
          | SynModuleDecl.NestedModule(_, decls, _, _) ->
              yield decl.Range
              yield! Seq.collect visitDeclaration decls
          | _ -> ()
      }
  
negative.code: 
  type SnapshotPoint with
      static member OfPos(snapshot: ITextSnapshot, p: pos) =
          let (line, column) = Pos.toZ(p)
          snapshot.GetLineFromLineNumber(line).Start.Add(column)
  
  let rangeToProperOutlineSnapshotSpan (snapshot: ITextSnapshot) (r:range) =
      SnapshotSpan(
          SnapshotPoint.OfPos(snapshot, r.Start),
          SnapshotPoint.OfPos(snapshot, r.End))
  
  type Tagger
      ( buffer: ITextBuffer
  