       flashDisposable = null
   marker
 
-getVisibleBufferRange = (editor) ->
-  [startRow, endRow] = editor.element.getVisibleRowRange()
-  return null unless (startRow? and endRow?)
-  startRow = editor.bufferRowForScreenRow(startRow)
-  endRow = editor.bufferRowForScreenRow(endRow)
-  new Range([startRow, 0], [endRow, Infinity])
-
 smartScrollToBufferPosition = (editor, point) ->
   editorElement = editor.element
   editorAreaHeight = editor.getLineHeightInPixels() * (editor.getRowsPerPage() - 1)


module.exports = {
  getAdjacentPaneForPane
  getVisibleBufferRange
  openItemInAdjacentPaneForPane
  decorateRange
  smartScrollToBufferPosition

    Element.prototype = options.prototype if options.prototype?
  Element

saveEditorState = (editor) ->
  editorElement = editor.element
  scrollTop = editorElement.getScrollTop()

  foldStartRows = editor.displayLayer.foldsMarkerLayer.findMarkers({}).map (m) -> m.getStartPosition().row
  ->
    for row in foldStartRows.reverse() when not editor.isFoldedAtBufferRow(row)
      editor.foldBufferRow(row)
