 
     @tree = newParse; @gutterVersion = -1
     @tree.start.insert @cursor
+    @removeBlankLines()
     @redrawMain()
 
     return success: true

    undo: (editor) -> editor.tree.start
    redo: (editor) -> editor.tree.start

  # addMicroUndoOperation pushes
  # the given operation to the undo stack,
  # and might possibly do some bureaucracy in the future.
  Editor::addMicroUndoOperation = (operation) ->
    @undoStack.push operation

    # If we have blank lines at the end,
    # get rid of them
    head = @tree.end.previousVisibleToken()

      head.remove()
      head = next

  # addMicroUndoOperation pushes
  # the given operation to the undo stack,
  # and might possibly do some bureaucracy in the future.
  Editor::addMicroUndoOperation = (operation) ->
    @undoStack.push operation
    @removeBlankLines()

  # The undo function pops and undoes
  # operations from the undo stack until
