mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Prevent unnecessary clipping of buffer range in isFoldedAtBufferRow
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
2f2f481fb5
commit
8ff5d81384
@@ -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.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user