anchor.diff:      let mutable found = false
       for pane in unbox<IPane[]> (Globals.atom.workspace.getPanes() ) do
         for item in pane.getItems() do
  -        try 
  +        try
             let ed = unbox<IEditor> item
  -          if ed.getPath() = file then 
  +          if ed.getPath() = file then
               pane.activate()
               pane.activateItem(ed) |> ignore
               ed.setCursorBufferPosition [| line; col |] |> ignore
  
positive.code:             setupIFrameResizeHandler ()
              Globals.atom.workspace
                ._open("F# Interactive", {split = "right"})
                ._done((fun ed -> activateAndCont ()) |> unbox<Function>))
  
  /// Get the code for current file/line/selection, together with line number
  /// (When evaluating line, move to the next line in the editor too.)
  let private getFsiSelection kind =
      let editor = Globals.atom.workspace.getActiveTextEditor()
      match kind with
      | File -> 1, editor.getText() 
      | Line -> 
          let line = editor.getCursorBufferPosition().row
          editor.setCursorBufferPosition [| int line + 1; 0 |] |> ignore
          int line+1, editor.lineTextForBufferRow(line).Trim()
  
negative.code: type MessageEvent = { data:string }
  
  /// A handler for messages sent by <iframe> elements that HTML output may put into FSI window
  /// (a message "height <id> <number>" means max-height of iframe #<id> is given number)
  let private setupIFrameResizeHandler () =
      Globals.window.addEventListener("message", fun e ->
        let data = (unbox e).data.Split(' ') |> List.ofSeq
        match data with
        | [ "height"; id; hgt ] ->
            let hgt = if float hgt > 500.0 then 500.0 else float hgt
            jq("#" + id + " iframe").height(string hgt + "px") |> ignore
            jq(".fsi").scrollTop(99999999.) |> ignore
  