     @state.content.backgroundColor = if @model.isMini() then null else @backgroundColor
     @state.content.placeholderText = if @model.isEmpty() then @model.getPlaceholderText() else null
 
-  # REFACTOR: This should be a @field rather than a function.
-  linesPerTile: ->
-    linesPerTile = Math.floor(@height / @lineHeight / @tileCount)
-    Math.max(1, linesPerTile)
-
   tileForRow: (row) ->
-    row - (row % @linesPerTile())
-
-  getVisibleTileRange: ->
+    row - (row % @tileSize)
+
+  getVisibleTilesRange: ->
     startTileRow = Math.max(0, @tileForRow(@startRow) - @tileOverdrawMargin)
     endTileRow = Math.min(
       @tileForRow(@model.getScreenLineCount()),

        tile.display = "none"
      else
        delete @state.content.tiles[id]


  updateLinesState: (tileState, startRow, endRow) ->
    tileState.lines ?= {}

    return unless @startRow? and @endRow? and @lineHeight?

    visibleTiles = {}
    for startRow in @getVisibleTilesRange() by @tileSize
      endRow = Math.min(@model.getScreenLineCount(), startRow + @tileSize)

      isNewTile = not @state.content.tiles.hasOwnProperty(startRow)
      tile = @state.content.tiles[startRow] ?= {}
      tile.top = startRow * @lineHeight - @scrollTop
      tile.height = @tileSize * @lineHeight
      tile.newlyCreated = isNewTile
      tile.display = "block"

