mirror of
https://github.com/atom/atom.git
synced 2026-02-09 06:05:11 -05:00
Fix exception when trying to fold non-foldable row
This commit is contained in:
@@ -3310,8 +3310,8 @@ class TextEditor extends Model
|
||||
# level.
|
||||
foldCurrentRow: ->
|
||||
{row} = @getCursorBufferPosition()
|
||||
range = @tokenizedBuffer.getFoldableRangeContainingPoint(Point(row, Infinity))
|
||||
@displayLayer.foldBufferRange(range)
|
||||
if range = @tokenizedBuffer.getFoldableRangeContainingPoint(Point(row, Infinity))
|
||||
@displayLayer.foldBufferRange(range)
|
||||
|
||||
# Essential: Unfold the most recent cursor's row by one level.
|
||||
unfoldCurrentRow: ->
|
||||
|
||||
Reference in New Issue
Block a user