Can start folds earlier on the same line as other folds.

This commit is contained in:
Nathan Sobo
2012-02-29 11:41:53 -07:00
parent 0510989e1c
commit 20dff5e79d
2 changed files with 11 additions and 2 deletions

View File

@@ -114,7 +114,8 @@ class LineFolder
new ScreenLineFragment([{value: '...', type: 'fold-placeholder', fold}], '...', [0, 3], fold.getRange().toDelta(), isAtomic: true)
foldsForBufferRow: (bufferRow) ->
@activeFolds[bufferRow] or []
folds = @activeFolds[bufferRow] or []
folds.sort (a, b) -> a.compare(b)
linesForScreenRows: (startRow, endRow) ->
@lineMap.linesForScreenRows(startRow, endRow)
@@ -194,3 +195,5 @@ class Fold
newRange.end.add(point.subtract(oldRange.end))
compare: (other) ->
@start.compare(other.start)