Rename Buffer.numLines to Buffer.getLineCount

This commit is contained in:
Corey Johnson
2012-06-01 11:25:58 -07:00
parent 32b3dfa0ca
commit 30d07fd1a0
4 changed files with 10 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ class AceFoldAdaptor
@buffer.lineForRow(bufferRow)
getLength: ->
@buffer.numLines()
@buffer.getLineCount()
$findClosingBracket: (bracketType, bufferPosition) ->
@highlighter.findClosingBracket([bufferPosition.row, bufferPosition.column - 1])

View File

@@ -76,7 +76,7 @@ class Buffer
rangeForRow: (row) ->
new Range([row, 0], [row, @lineLengthForRow(row)])
numLines: ->
getLineCount: ->
@getLines().length
getLastRow: ->

View File

@@ -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))