     screenLines
 
   # Given a buffer row range, compute an index of all folds that appear on
-  # screen lines containing this range. This may expand the initial buffer range
-  # if the start row or end row appear on the same screen line as earlier or
-  # later buffer lines due to folds.
-  #
-  # Returns an object containing the new startBufferRow and endBufferRow, along
-  # with a folds object mapping startRow to startColumn to endPosition. This
-  # object will be referenced when updating the patch to skip folded regions of
-  # the buffer.
+  # screen lines containing this range. Returns a folds object mapping startRow
+  # to startColumn to endPosition. This object will be referenced when updating
+  # the patch to skip folded regions of the buffer.
   computeFoldsInBufferRowRange: (startBufferRow, endBufferRow) ->
     folds = {}
     foldMarkers = @foldsMarkerLayer.findMarkers(intersectsRowRange: [startBufferRow, endBufferRow - 1])
     if foldMarkers.length > 0
-      # If the first fold starts before the initial row range, prepend any
-      # fold markers that intersect the first fold's row range.
-      loop
-        foldsStartBufferRow = foldMarkers[0].getStartPosition().row
-        break unless foldsStartBufferRow < startBufferRow
-        precedingFoldMarkers = @foldsMarkerLayer.findMarkers(intersectsRowRange: [foldsStartBufferRow, startBufferRow - 1])
-        foldMarkers.unshift(precedingFoldMarkers...)
-        startBufferRow = foldsStartBufferRow
-
       # Index fold end positions by their start row and start column.
       i = 0
       while i < foldMarkers.length

    {startScreenRow, endScreenRow, startBufferRow, endBufferRow}

  buildSpatialTokenLines: (startBufferRow, endBufferRow) ->
    {startBufferRow, endBufferRow, folds} = @computeFoldsInBufferRowRange(startBufferRow, endBufferRow)

    screenLines = []
    bufferRow = startBufferRow


        # Process subsequent folds that intersect the current fold.
        loop
          # Skip subsequent fold markers that nest within the current fold, and
          # merge folds that start within the the current fold but end after it.
          if i < (foldMarkers.length - 1) and comparePoints(foldMarkers[i + 1].getStartPosition(), foldEnd) <= 0
