Rename LanguageModel::isBufferRowFoldable to ::isFoldableAtBufferRow

It blends in better with the methods on Editor.
This commit is contained in:
Nathan Sobo
2014-01-17 15:19:07 -07:00
parent b2dff15e51
commit fa6bce3085
3 changed files with 4 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ class Editor extends Model
@delegatesMethods 'foldAll', 'unfoldAll', 'foldAllAtIndentLevel', 'foldBufferRow',
'unfoldBufferRow', 'suggestedIndentForBufferRow', 'autoIndentBufferRow', 'autoIndentBufferRows',
'autoDecreaseIndentForBufferRow', 'toggleLineCommentsForBufferRows', 'isBufferRowFoldable',
'autoDecreaseIndentForBufferRow', 'toggleLineCommentsForBufferRows', 'isFoldableAtBufferRow',
toProperty: 'languageMode'
constructor: ({@softTabs, initialLine, tabLength, softWrap, @displayBuffer, buffer, registerEditor, suppressCursorCreation}) ->

View File

@@ -209,7 +209,7 @@ class Gutter extends View
classes = "line-number line-number-#{row}"
classes += ' fold' if editor.isFoldedAtBufferRow(row)
classes += ' foldable' if row isnt lastRow and editor.isBufferRowFoldable(row)
classes += ' foldable' if row isnt lastRow and editor.isFoldableAtBufferRow(row)
rowValuePadding = _.multiplyString(' ', maxDigits - rowValue.length)

View File

@@ -162,7 +162,7 @@ class LanguageMode
return [startRow, endRow] if startRow isnt endRow
rowRangeForCodeFoldAtBufferRow: (bufferRow) ->
return null unless @isBufferRowFoldable(bufferRow)
return null unless @isFoldableAtBufferRow(bufferRow)
startIndentLevel = @editor.indentationForBufferRow(bufferRow)
scopes = @editor.scopesForBufferPosition([bufferRow, 0])
@@ -178,7 +178,7 @@ class LanguageMode
[bufferRow, foldEndRow]
isBufferRowFoldable: (bufferRow) ->
isFoldableAtBufferRow: (bufferRow) ->
return false if @editor.isBufferRowBlank(bufferRow)
nextNonEmptyRow = @editor.nextNonBlankBufferRow(bufferRow)
return false unless nextNonEmptyRow?