mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
lineForBufferRow -> lineTextForBufferRow
This commit is contained in:
@@ -168,7 +168,7 @@ class LanguageMode
|
||||
continue if @editor.isBufferRowBlank(row)
|
||||
indentation = @editor.indentationForBufferRow(row)
|
||||
if indentation <= startIndentLevel
|
||||
includeRowInFold = indentation == startIndentLevel and @foldEndRegexForScopes(scopes)?.searchSync(@editor.lineForBufferRow(row))
|
||||
includeRowInFold = indentation == startIndentLevel and @foldEndRegexForScopes(scopes)?.searchSync(@editor.lineTextForBufferRow(row))
|
||||
foldEndRow = row if includeRowInFold
|
||||
break
|
||||
|
||||
@@ -207,7 +207,7 @@ class LanguageMode
|
||||
# Right now, a paragraph is a block of text bounded by and empty line or a
|
||||
# block of text that is not the same type (comments next to source code).
|
||||
rowRangeForParagraphAtBufferRow: (bufferRow) ->
|
||||
return unless /\w/.test(@editor.lineForBufferRow(bufferRow))
|
||||
return unless /\w/.test(@editor.lineTextForBufferRow(bufferRow))
|
||||
|
||||
if @isLineCommentedAtBufferRow(bufferRow)
|
||||
isOriginalRowComment = true
|
||||
@@ -220,14 +220,14 @@ class LanguageMode
|
||||
startRow = bufferRow
|
||||
while startRow > firstRow
|
||||
break if @isLineCommentedAtBufferRow(startRow - 1) != isOriginalRowComment
|
||||
break unless /\w/.test(@editor.lineForBufferRow(startRow - 1))
|
||||
break unless /\w/.test(@editor.lineTextForBufferRow(startRow - 1))
|
||||
startRow--
|
||||
|
||||
endRow = bufferRow
|
||||
lastRow = @editor.getLastBufferRow()
|
||||
while endRow < lastRow
|
||||
break if @isLineCommentedAtBufferRow(endRow + 1) != isOriginalRowComment
|
||||
break unless /\w/.test(@editor.lineForBufferRow(endRow + 1))
|
||||
break unless /\w/.test(@editor.lineTextForBufferRow(endRow + 1))
|
||||
endRow++
|
||||
|
||||
new Range([startRow, 0], [endRow, @editor.lineLengthForBufferRow(endRow)])
|
||||
|
||||
Reference in New Issue
Block a user