       range = marker.getBufferRange()
       @setSelectedBufferRange(range)
       range
-
-  # Merge cursors that have the same screen position
-  mergeCursors: ->
-    positions = []
-    for cursor in @getCursors()
-      position = cursor.getBufferPosition().toString()
-      if position in positions
-        cursor.destroy()
-      else
-        positions.push(position)
 
   # Calls the given function with each selection, then merges selections
   expandSelectionsForward: (fn) ->

      selection.cutToEndOfLine(maintainClipboard)
      maintainClipboard = true

  # Public: For each selection, cut the selected text.
  cutSelectedText: ->
    maintainClipboard = false
    @mutateSelectedText (selection) ->
      selection.cut(maintainClipboard)
      maintainClipboard = true

  # Public: For each selection, copy the selected text.
  copySelectedText: ->
    maintainClipboard = false
    for selection in @getSelections()
      selection.copy(maintainClipboard)
      maintainClipboard = true

  # Public: For each selection, replace the selected text with the contents of
  # the clipboard.
  #
  # If the clipboard contains the same number of selections as the current
  # editor, each selection will be replaced with the content of the
  # corresponding clipboard selection text.
  #
  # * `options` See {Selection::insertText}.
  pasteText: (options={}) ->
    {text, metadata} = atom.clipboard.readWithMetadata()

    containsNewlines = text.indexOf('\n') isnt -1

    if metadata?.selections? and metadata.selections.length is @getSelections().length
      @mutateSelectedText (selection, index) ->
        text = metadata.selections[index]
        selection.insertText(text, options)

      return

    else if atom.config.get("editor.normalizeIndentOnPaste") and metadata?.indentBasis?
      if !@getCursor().hasPrecedingCharactersOnLine() or containsNewlines
        options.indentBasis ?= metadata.indentBasis

    @insertText(text, options)

  # Public: Undo the last change.
  undo: ->
    @getCursor().needsAutoscroll = true
    @buffer.undo(this)

  # Public: Redo the last change.
  redo: ->
    @getCursor().needsAutoscroll = true
    @buffer.redo(this)

  # Public: Fold the most recent cursor's row based on its indentation level.
  #

  addSelectionAbove: ->
    @expandSelectionsBackward (selection) -> selection.addSelectionAbove()

  # Public: Expand selections to the beginning of their containing word.
  #
  # Operates on all selections. Moves the cursor to the beginning of the
