Prevent unnecessary clipping of buffer range in isFoldedAtBufferRow

Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
Antonio Scandurra
2017-05-11 20:12:10 +02:00
committed by Nathan Sobo
parent 2f2f481fb5
commit 8ff5d81384

View File

@@ -3385,7 +3385,11 @@ class TextEditor extends Model
#
# Returns a {Boolean}.
isFoldedAtBufferRow: (bufferRow) ->
@displayLayer.foldsIntersectingBufferRange(Range(Point(bufferRow, 0), Point(bufferRow, Infinity))).length > 0
range = Range(
Point(bufferRow, 0),
Point(bufferRow, @buffer.lineLengthForRow(bufferRow))
)
@displayLayer.foldsIntersectingBufferRange(range).length > 0
# Extended: Determine whether the given row in screen coordinates is folded.
#