         # Any folds in the text that is moved will need to be re-created.
         # It includes the folds that were intersecting with the selection.
         rangesToRefold = selectionFoldRanges.concat(
-          @outermostFoldsInBufferRowRange(linesRange.start.row, linesRange.end.row).map (fold) ->
+          @displayLayer.outermostFoldsInBufferRowRange(linesRange.start.row, linesRange.end.row).map (fold) ->
             range = fold.getBufferRange()
-            fold.destroy()
+            @displayLayer.destroyFold(fold)
             range
         ).map (range) -> range.translate([insertDelta, 0])
 
         # # Make sure the inserted text doesn't go into an existing fold
-        # if fold = @displayBuffer.largestFoldStartingAtBufferRow(followingBufferRow)
-        #   rangesToRefold.push(fold.getBufferRange().translate([insertDelta - 1, 0]))
-        #   fold.destroy()
+        if fold = @displayLayer.largestFoldStartingAtBufferRow(followingBufferRow)
+          rangesToRefold.push(@displayLayer.bufferRangeForFold(fold).translate([insertDelta - 1, 0]))
+          @displayLayer.destroyFold(fold)
 
         # Delete lines spanned by selection and insert them on the following correct buffer row
         insertPosition = new Point(selection.translate([insertDelta, 0]).start.row, 0)


        # Restore folds that existed before the lines were moved
        for rangeToRefold in rangesToRefold
          @displayBuffer.foldBufferRowRange(rangeToRefold.start.row, rangeToRefold.end.row)

        for selection in selectionsToMove
          newSelectionRanges.push(selection.translate([insertDelta, 0]))

        # insert delta is know.
        selectionFoldRanges = []
        foldAtSelectionStart =
          @displayLayer.largestFoldContainingBufferRow(selection.start.row)
        foldAtSelectionEnd =
          @displayLayer.largestFoldContainingBufferRow(selection.end.row)
        if fold = foldAtSelectionStart ? foldAtSelectionEnd
          selectionFoldRanges.push range = @displayLayer.bufferRangeForFold(fold)
          newEndRow = range.end.row + 1
          linesRange.end.row = newEndRow if newEndRow > linesRange.end.row
          @displayLayer.destroyFold(fold)

        # If selected line range is followed by a fold, one line below on screen
        # could be multiple lines in the buffer. But at the same time, if the
