     @editSession.buffer.delete(bufferRange) unless bufferRange.isEmpty()
     @cursor?.setBufferPosition(bufferRange.start)
 
-  # Deletes the line.
+  # Public: Removes the line at the beginning of the selection if the selection
+  # is empty unless the selection spans multiple lines in which case all lines
+  # are removed.
   deleteLine: ->
     if @isEmpty()
       start = @cursor.getScreenRow()

      @editSession.addSelectionForBufferRange(range, goalBufferRange: range)
      break

  # Replaces text at the current selection.
  #
  # text - A {String} representing the text to add
  # options - A hash containing the following 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)

  insertText: (text, options={}) ->
    oldBufferRange = @getBufferRange()
    @editSession.destroyFoldsContainingBufferRow(oldBufferRange.end.row)

  wordwise: false
  needsAutoscroll: null


  # Private:
  constructor: ({@cursor, @marker, @editSession}) ->
    @cursor.selection = this
    @marker.on 'changed', => @screenRangeChanged()
