 class Editor extends Model
   Serializable.includeInto(this)
   atom.deserializers.add(this)
+  Delegator.includeInto(this)
 
   @properties
     scrollTop: 0

    @getCursor().needsAutoscroll = true
    @buffer.redo(this)

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

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

  # Public: Creates a fold for each section at the given indent level.
  foldAllAtIndentLevel: (indentLevel) ->
    @languageMode.foldAllAtIndentLevel(indentLevel)

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

  # Public: Folds a give buffer row.
  foldBufferRow: (bufferRow) ->
    @languageMode.foldBufferRow(bufferRow)

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

  # Public: Unfolds a given a buffer row.
  unfoldBufferRow: (bufferRow) ->
    @languageMode.unfoldBufferRow(bufferRow)

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

  # {Delegates to: DisplayBuffer.largestFoldStartingAtScreenRow}
  largestFoldStartingAtScreenRow: (screenRow) ->
    @displayBuffer.largestFoldStartingAtScreenRow(screenRow)

  # Public: Moves the selected line up one row.
  moveLineUp: ->
