mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Rename Buffer.numLines to Buffer.getLineCount
This commit is contained in:
@@ -9,7 +9,7 @@ class AceFoldAdaptor
|
||||
@buffer.lineForRow(bufferRow)
|
||||
|
||||
getLength: ->
|
||||
@buffer.numLines()
|
||||
@buffer.getLineCount()
|
||||
|
||||
$findClosingBracket: (bracketType, bufferPosition) ->
|
||||
@highlighter.findClosingBracket([bufferPosition.row, bufferPosition.column - 1])
|
||||
|
||||
@@ -76,7 +76,7 @@ class Buffer
|
||||
rangeForRow: (row) ->
|
||||
new Range([row, 0], [row, @lineLengthForRow(row)])
|
||||
|
||||
numLines: ->
|
||||
getLineCount: ->
|
||||
@getLines().length
|
||||
|
||||
getLastRow: ->
|
||||
|
||||
@@ -28,7 +28,7 @@ class MoveUp extends Motion
|
||||
class MoveDown extends Motion
|
||||
execute: ->
|
||||
{column, row} = @editor.getCursorScreenPosition()
|
||||
@editor.moveCursorDown() if row < (@editor.buffer.numLines() - 1)
|
||||
@editor.moveCursorDown() if row < (@editor.buffer.getLineCount() - 1)
|
||||
|
||||
class MoveToPreviousWord extends Motion
|
||||
execute: ->
|
||||
@@ -55,7 +55,7 @@ class MoveToNextWord extends Motion
|
||||
|
||||
if match
|
||||
column += match.index
|
||||
else if row + 1 == @editor.buffer.numLines()
|
||||
else if row + 1 == @editor.buffer.getLineCount()
|
||||
column = @editor.buffer.lineForRow(row).length
|
||||
else
|
||||
nextLineMatch = regex.exec(@editor.buffer.lineForRow(++row))
|
||||
|
||||
Reference in New Issue
Block a user