     [startRow...endRow]
 
   updateVisibleTilesState: ->
+    @updateTilesState(@getVisibleRows())
+
+  deleteTemporaryTiles: ->
+    for tileId, tileState of @state.content.tiles when tileState.temporary
+      delete @state.content.tiles[tileId]
+      delete @lineNumberGutter.tiles[tileId]
+
+  updateTilesState: (screenRows, temporary = false) ->
     return unless @startRow? and @endRow? and @lineHeight?
 
-    @updateTilesState(@getVisibleRows())
-
-  updateTilesState: (screenRows) ->
     screenRows.sort (a, b) -> a - b
 
     visibleTiles = {}

  getState: ->
    @updating = true

    @updateVerticalDimensions()
    @updateScrollbarDimensions()
    @updateStartRow()
    @updateEndRow()
    @updateCommonGutterState()
    @updateHorizontalDimensions()
    @updateReflowState()

    @updating is false

  getStateForMeasurements: (screenRows) ->
    @updateVerticalDimensions()
    @updateScrollbarDimensions()
    @updateStartRow()
    @updateEndRow()

    screenRows = _.without(screenRows, null, undefined, @getVisibleRows()...)

    @updateVisibleTilesState() if @shouldUpdateLineNumbersState or @shouldUpdateLinesState
    @updateTilesState(screenRows, true)

    @state

