mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Rename LanguageModel::isBufferRowFoldable to ::isFoldableAtBufferRow
It blends in better with the methods on Editor.
This commit is contained in:
@@ -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}) ->
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user