🔥 Use just isFoldableAtBufferRow

This commit is contained in:
Antonio Scandurra
2016-02-17 15:05:31 +01:00
parent 90c75fd6da
commit bea324eae9
7 changed files with 47 additions and 75 deletions

View File

@@ -2939,8 +2939,7 @@ class TextEditor extends Model
#
# Returns a {Boolean}.
isFoldableAtBufferRow: (bufferRow) ->
# @languageMode.isFoldableAtBufferRow(bufferRow)
@foldableBufferRowsForBufferRowRange(bufferRow, bufferRow).has(bufferRow)
@displayBuffer.isFoldableAtBufferRow(bufferRow)
# Extended: Determine whether the given row in screen coordinates is foldable.
#
@@ -2953,9 +2952,6 @@ class TextEditor extends Model
bufferRow = @displayBuffer.bufferRowForScreenRow(screenRow)
@isFoldableAtBufferRow(bufferRow)
foldableBufferRowsForBufferRowRange: (startRow, endRow) ->
@displayBuffer.foldableBufferRowsForBufferRowRange(startRow, endRow)
# Extended: Fold the given buffer row if it isn't currently folded, and unfold
# it otherwise.
toggleFoldAtBufferRow: (bufferRow) ->