 
   # Public: Replaces text at the current selection.
   #
-  # * text:
-  #   A {String} representing the text to add
-  # * options
-  #    + select:
-  #      if `true`, selects the newly added text
-  #    + autoIndent:
-  #      if `true`, indents all inserted text appropriately
-  #    + autoIndentNewline:
-  #      if `true`, indent newline appropriately
-  #    + autoDecreaseIndent:
-  #      if `true`, decreases indent level appropriately (for example, when a
-  #      closing bracket is inserted)
-  #    + undo:
-  #      if `skip`, skips the undo stack for this operation.
+  # text - A {String} representing the text to add
+  # options - An {Object} with keys:
+  #   :select - if `true`, selects the newly added text.
+  #   :autoIndent - if `true`, indents all inserted text appropriately.
+  #   :autoIndentNewline - if `true`, indent newline appropriately.
+  #   :autoDecreaseIndent - if `true`, decreases indent level appropriately
+  #                         (for example, when a closing bracket is inserted).
+  #   :undo - if `skip`, skips the undo stack for this operation.
   insertText: (text, options={}) ->
     oldBufferRange = @getBufferRange()
     @editor.destroyFoldsContainingBufferRow(oldBufferRange.end.row)

    @editor.createFold(range.start.row, range.end.row)
    @cursor.setBufferPosition([range.end.row + 1, 0])

  # Public: ?
  modifySelection: (fn) ->
    @retainSelection = true
    @plantTail()

  # Public: Selects the text from the current cursor position to a given buffer
  # position.
  #
  # position - An instance of {Point}, with a given `row` and `column`.
  selectToBufferPosition: (position) ->
    @modifySelection => @cursor.setBufferPosition(position)

