This commit is contained in:
Antonio Scandurra
2015-11-06 17:41:00 +01:00
parent dd10216943
commit 7d97241f35
2 changed files with 3 additions and 3 deletions

View File

@@ -465,8 +465,8 @@ class DisplayBuffer extends Model
folds
# Returns all the folds that contain the given row range.
foldsContainingBufferRowRange: (startRow, endRow) ->
# Returns all the folds that intersect the given row range.
foldsIntersectingBufferRowRange: (startRow, endRow) ->
@foldForMarker(marker) for marker in @findFoldMarkers(intersectsRowRange: [startRow, endRow])
# Public: Given a buffer row, this returns folds that include it.

View File

@@ -97,7 +97,7 @@ class LanguageMode
# Unfolds all the foldable lines in the buffer.
unfoldAll: ->
for fold in @editor.displayBuffer.foldsContainingBufferRowRange(0, @buffer.getLastRow()) by -1
for fold in @editor.displayBuffer.foldsIntersectingBufferRowRange(0, @buffer.getLastRow()) by -1
fold.destroy()
return