Merge branch 'master' into dh-async-repo

This commit is contained in:
joshaber
2015-11-07 01:35:48 -05:00
4 changed files with 12 additions and 8 deletions

View File

@@ -465,6 +465,10 @@ class DisplayBuffer extends Model
folds
# 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,8 +97,8 @@ class LanguageMode
# Unfolds all the foldable lines in the buffer.
unfoldAll: ->
for row in [@buffer.getLastRow()..0] by -1
fold.destroy() for fold in @editor.displayBuffer.foldsStartingAtBufferRow(row)
for fold in @editor.displayBuffer.foldsIntersectingBufferRowRange(0, @buffer.getLastRow()) by -1
fold.destroy()
return
# Fold all comment and code blocks at a given indentLevel