From 140234fd1210510eba5a29abb086fcd441215a79 Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Thu, 22 Mar 2012 11:59:42 -0700 Subject: [PATCH] Rename Editor.lastRow to Editor.lastScreenRow --- spec/atom/editor-spec.coffee | 6 +++--- src/atom/editor.coffee | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/atom/editor-spec.coffee b/spec/atom/editor-spec.coffee index 43d020705..f63ae5925 100644 --- a/spec/atom/editor-spec.coffee +++ b/spec/atom/editor-spec.coffee @@ -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]) diff --git a/src/atom/editor.coffee b/src/atom/editor.coffee index cbc2fd559..eb60e7332 100644 --- a/src/atom/editor.coffee +++ b/src/atom/editor.coffee @@ -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) ->