         start: value.length + start
         end: value.length + start
 
-    range = @editor.getSelection().getBufferRange()
     changeRange = [
       Point.fromObject(@editor.getBuffer().positionForCharacterIndex(start))
       Point.fromObject(@editor.getBuffer().positionForCharacterIndex(end))


    @editor.getBuffer().change(changeRange, value)

    range.start = Point.fromObject(@editor.getBuffer().positionForCharacterIndex(firstTabStop.start))
    range.end = Point.fromObject(@editor.getBuffer().positionForCharacterIndex(firstTabStop.end))

    # passes the cursor along when tabbing normally
    unless value == @editor.getTabText()
      @editor.getSelection().setBufferRange(range)

  # Returns the editor content.
  getContent: ->

    value = tabstopData.text.replace(/\t/g, @editorView.editor.getTabText())
    firstTabStop = tabstopData.tabstops[0]

    if firstTabStop
      firstTabStop.start += start
      firstTabStop.end += start
