       @getScrollLeft() == other.getScrollLeft() and
       @getCursorScreenPosition().isEqual(other.getCursorScreenPosition())
 
+  # Public: Controls visiblity based on the given Boolean.
   setVisible: (visible) -> @displayBuffer.setVisible(visible)
 
-  # Defines the value of the `EditSession`'s `scrollTop` property.
-  #
-  # scrollTop - A {Number} defining the `scrollTop`, in pixels.
+  # Public: FIXME: I don't understand this.
   setScrollTop: (scrollTop) -> @state.set('scrollTop', scrollTop)
 
-  # Gets the value of the `EditSession`'s `scrollTop` property.
-  #
-  # Returns a {Number} defining the `scrollTop`, in pixels.
-  getScrollTop: ->
-    @state.get('scrollTop') ? 0
-
-  # Defines the value of the `EditSession`'s `scrollLeft` property.
-  #
-  # scrollLeft - A {Number} defining the `scrollLeft`, in pixels.
+  # Public: Returns the current `scrollTop` value
+  getScrollTop: -> @state.get('scrollTop') ? 0
+
+  # Public: FIXME: I don't understand this.
   setScrollLeft: (scrollLeft) -> @state.set('scrollLeft', scrollLeft)
 
-  # Gets the value of the `EditSession`'s `scrollLeft` property.
-  #
-  # Returns a {Number} defining the `scrollLeft`, in pixels.
+  # Public: Returns the current `scrollLeft` value
   getScrollLeft: -> @state.get('scrollLeft')
 
   # Set the number of characters that can be displayed horizontally in the


    @insertText(text, options)

  # Undos the last {TextBuffer} change.
  undo: ->
    @buffer.undo(this)

  # Redos the last {TextBuffer} change.
  redo: ->
    @buffer.redo(this)

  # Folds all the rows.
  foldAll: ->
    @languageMode.foldAll()

  # Unfolds all the rows.
  unfoldAll: ->
    @languageMode.unfoldAll()

  foldAllAtIndentLevel: (indentLevel) ->
    @languageMode.foldAllAtIndentLevel(indentLevel)

  # Folds the current row.
  foldCurrentRow: ->
    bufferRow = @bufferPositionForScreenPosition(@getCursorScreenPosition()).row
    @foldBufferRow(bufferRow)

  # Given a buffer row, this folds it.
  #
  # bufferRow - A {Number} indicating the buffer row
  foldBufferRow: (bufferRow) ->
    @languageMode.foldBufferRow(bufferRow)

  # Unfolds the current row.
  unfoldCurrentRow: ->
    bufferRow = @bufferPositionForScreenPosition(@getCursorScreenPosition()).row
    @unfoldBufferRow(bufferRow)

  # Given a buffer row, this unfolds it.
  #
  # bufferRow - A {Number} indicating the buffer row
  unfoldBufferRow: (bufferRow) ->
    @languageMode.unfoldBufferRow(bufferRow)

  # Folds all selections.
  foldSelection: ->
    selection.fold() for selection in @getSelections()


      @setCursorScreenPosition(@getCursorScreenPosition().translate([1]))
      @foldCurrentRow() if cursorRowFolded

  # Private:
  mutateSelectedText: (fn) ->
    @transact => fn(selection) for selection in @getSelections()

  # Private:
  replaceSelectedText: (options={}, fn) ->
    {selectWordIfEmpty} = options
    @mutateSelectedText (selection) ->
