anchor.diff:      member private x.UpdateDocumentOutline _ = 
           if not refreshingOutline then
               refreshingOutline <- true
  -            timerId <- GLib.Timeout.Add (3000u, (fun _ -> x.refillTree))
  +            GLib.Timeout.Add (1000u, (fun _ -> x.refillTree)) |> ignore
   
       member private x.refillTree = 
  +        match treeView with
  +        | Some(treeView) -> 
  +            if treeView.IsRealized then
  +                let ast = maybe { let! context = x.DocumentContext |> Option.ofNull
  +                                  let! parsedDocument = context.ParsedDocument |> Option.ofNull
  +                                  let! ast = parsedDocument.Ast |> Option.tryCast<ParseAndCheckResults>
  +                                  return ast }
   
  -        let ast = maybe { let! context = x.DocumentContext |> Option.ofNull
  -                          let! parsedDocument = context.ParsedDocument |> Option.ofNull
  -                          let! ast = parsedDocument.Ast |> Option.tryCast<ParseAndCheckResults>
  -                          return ast }
  +                DispatchService.AssertGuiThread()
  +                Gdk.Threads.Enter()
  +                ast |> Option.iter (fun ast -> 
  +                    let treeStore = treeView.Model :?> TreeStore
  +                    treeStore.Clear()
  +                    let toplevel = ast.GetNavigationItems()
  +                    for item in toplevel do
  +                        let iter = treeStore.AppendValues(item.Declaration)
  +                        for nested in item.Nested do
  +                            treeStore.AppendValues(iter, [| nested |]) |> ignore
  +                    treeView.ExpandAll())
  +                Gdk.Threads.Leave()
  +        | None -> ()
   
  -        DispatchService.AssertGuiThread()
  -        Gdk.Threads.Enter()
  -        ast |> Option.iter (fun ast -> 
  -                   match treeView with
  -                   | Some(treeView) -> 
  -                       if treeView.Model = null || not treeView.IsRealized then
  -                           false
  -                       let treeStore = treeView.Model :?> TreeStore
  -                       treeStore.Clear()
  -                       let toplevel = ast.GetNavigationItems()
  -                       for item in toplevel do
  -                           let iter = treeStore.AppendValues(item.Declaration)
  -                           for nested in item.Nested do
  -                               treeStore.AppendValues(iter, [| nested |]) |> ignore
  -                       treeView.ExpandAll()
  -                   | None -> ())
  -        Gdk.Threads.Leave()
           refreshingOutline <- false
  -        timerId <- 0u
           false
    
       override x.Dispose() = 
  
positive.code:     inherit TextEditorExtension()
      let mutable treeView : PadTreeView option = None
      let mutable refreshingOutline : bool = false
      let mutable timerId : uint32 = 0u
  
      override x.Initialize() = 
          base.Initialize()
  
negative.code:                               ()
                      | false -> ()
  
                  treeView <- Some padTreeView
  
                  let pixRenderer = new CellRendererImage()
  