Rename Editor.lastRow to Editor.lastScreenRow

This commit is contained in:
Corey Johnson & Nathan Sobo 2012-03-22 11:59:42 -07:00
parent 5e5cd980f3
commit 140234fd12
2 changed files with 5 additions and 5 deletions

View File

@ -107,10 +107,10 @@ describe "Editor", ->
expect(editor.setMaxLineLength).not.toHaveBeenCalled()
it "allows the cursor to move down to the last line", ->
_.times editor.lastRow(), -> editor.moveCursorDown()
expect(editor.getCursorScreenPosition()).toEqual [editor.lastRow(), 0]
_.times editor.getLastScreenRow(), -> editor.moveCursorDown()
expect(editor.getCursorScreenPosition()).toEqual [editor.getLastScreenRow(), 0]
editor.moveCursorDown()
expect(editor.getCursorScreenPosition()).toEqual [editor.lastRow(), 2]
expect(editor.getCursorScreenPosition()).toEqual [editor.getLastScreenRow(), 2]
it "allows the cursor to move up to a shorter soft wrapped line", ->
editor.setCursorScreenPosition([11, 15])

View File

@ -170,7 +170,7 @@ class Editor extends View
renderLines: ->
@lineCache = []
@lines.find('.line').remove()
@insertLineElements(0, @buildLineElements(0, @lastRow()))
@insertLineElements(0, @buildLineElements(0, @getLastScreenRow()))
getScreenLines: ->
@renderer.getLines()
@ -181,7 +181,7 @@ class Editor extends View
screenLineCount: ->
@renderer.lineCount()
lastRow: ->
getLastScreenRow: ->
@screenLineCount() - 1
setBuffer: (buffer) ->