anchor.diff:              | policyBag -> policyBag  :> PolicyContainer
   
           let mimeTypeChain = DesktopService.GetMimeTypeInheritanceChain (FSharpFormatter.MimeType)
  -        let input = doc.Editor.Text
  +        let input = editor.Text
           if fromOffset = 0 && toOffset = String.length input then 
               LoggingService.LogInfo("**Fantomas**: OnTheFly Formatting document")
  -            formatText (Some doc) policyParent mimeTypeChain input Document
  +            formatText (Some editor) policyParent mimeTypeChain input Document
               |> ignore
           else 
               LoggingService.LogInfo("**Fantomas**: OnTheFly Formatting selection")
  -            formatText (Some doc) policyParent mimeTypeChain input (Selection(fromOffset, toOffset))
  +            formatText (Some editor) policyParent mimeTypeChain input (Selection(fromOffset, toOffset))
               |> ignore
   
       override x.FormatText(policyParent, mimeTypeChain, input, fromOffset, toOffset) = 
  
positive.code:     override x.SupportsCorrectingIndent = false
      override x.CorrectIndenting(_policyParent, _mimeTypeChain, _data, _line) = raise (NotSupportedException())
  
      override x.OnTheFlyFormat(doc, fromOffset, toOffset) =
          let policyParent : PolicyContainer =
              match doc.Project with
              | null -> PolicyService.DefaultPolicies
              | project ->
              match project.Policies with 
  
negative.code:         if trimLinefeed then output.TrimEnd('\n') 
          else output
                      
      let format (editor : Editor.TextEditor option) style formatting input options =
          let isFsiFile = 
              match editor with 
              | Some d -> d.FileName.Extension.Equals(".fsi", StringComparison.OrdinalIgnoreCase)
              | _ -> false
  
  