     else
       new Point(rows, offset - characters)
 
+  # Public: Returns the length of the buffer in characters.
   getMaxCharacterIndex: ->
     @offsetIndex.totalTo(Infinity, 'rows').characters

  @delegatesMethods 'markRange', 'markPosition', 'getMarker', 'getMarkers',
    'findMarkers', toProperty: 'markers'

  constructor: (params) ->
    text = params if typeof params is 'string'
    @lines = ['']

    @markers?.resumeChangeEvents()
    @emit 'markers-updated'

  # Public: Returns a {String} of text in the given {Range}.
  getTextInRange: (range) ->
    range = @clipRange(Range.fromObject(range))
    startRow = range.start.row
