Folds can start at the beginning of a line

This commit is contained in:
Nathan Sobo
2012-02-28 19:02:26 -07:00
parent 65c7a6126e
commit da53eeb80d
2 changed files with 7 additions and 2 deletions

View File

@@ -95,10 +95,10 @@ class LineFolder
screenLine = @highlighter.lineForScreenRow(bufferRow).splitAt(startColumn)[1]
for fold in @foldsForBufferRow(bufferRow)
{ start, end } = fold.getRange()
if start.column > startColumn
if start.column >= startColumn
prefix = screenLine.splitAt(start.column - startColumn)[0]
suffix = @buildLineForBufferRow(end.row, end.column)
return _.flatten([prefix, @buildFoldPlaceholder(fold), suffix])
return _.compact(_.flatten([prefix, @buildFoldPlaceholder(fold), suffix]))
screenLine
buildFoldPlaceholder: (fold) ->