     {lineHeightInPixels, charWidth}
 
   measureNewLines: ->
-    [visibleStartRow, visibleEndRow] = @props.editor.getVisibleRowRange()
+    [visibleStartRow, visibleEndRow] = @getVisibleRowRange()
     linesNode = @refs.lines.getDOMNode()
 
     for tokenizedLine, i in @props.editor.linesForScreenRows(visibleStartRow, visibleEndRow - 1)

    WebkitTransform = "translateY(#{-editor.getScrollTop()}px)"

    div className: 'scrollable-content', style: {height, WebkitTransform},
      @renderOverlayer()
      @renderVisibleLines()
      @renderUnderlayer()

  renderOverlayer: ->
    {editor} = @props

    div className: 'overlayer',
      for selection in editor.getSelections() when editor.selectionIntersectsVisibleRowRange(selection)
        CursorComponent(cursor: selection.cursor)

  renderVisibleLines: ->
    {editor} = @props
    [startRow, endRow] = editor.getVisibleRowRange()
    lineHeightInPixels = editor.getLineHeight()
    precedingHeight = startRow * lineHeightInPixels
    followingHeight = (editor.getScreenLineCount() - endRow) * lineHeightInPixels

      div className: 'spacer', key: 'bottom-spacer', style: {height: followingHeight}
    ]

  renderCursors: ->
    {editor} = @props

    for selection in editor.getSelections() when editor.selectionIntersectsVisibleRowRange(selection)
      CursorComponent(cursor: selection.cursor)

  renderUnderlayer: ->
    {editor} = @props

    div className: 'underlayer',
      for selection in editor.getSelections() when editor.selectionIntersectsVisibleRowRange(selection)
        SelectionComponent({selection})

  getVisibleRowRange: ->
    visibleRowRange = @props.editor.getVisibleRowRange()
    if @visibleRowOverrides?
      visibleRowRange[0] = Math.min(visibleRowRange[0], @visibleRowOverrides[0])
      visibleRowRange[1] = Math.max(visibleRowRange[1], @visibleRowOverrides[1])
    visibleRowRange

  getInitialState: -> {}

