diff --git a/spec/app/display-buffer-spec.coffee b/spec/app/display-buffer-spec.coffee index 8227a94e2..cbb27cd42 100644 --- a/spec/app/display-buffer-spec.coffee +++ b/spec/app/display-buffer-spec.coffee @@ -17,10 +17,10 @@ describe "DisplayBuffer", -> describe "when the buffer changes", -> it "renders line numbers correctly", -> - originalLineCount = displayBuffer.lineCount() + originalLineCount = displayBuffer.getLineCount() oneHundredLines = [0..100].join("\n") buffer.insert([0,0], oneHundredLines) - expect(displayBuffer.lineCount()).toBe 100 + originalLineCount + expect(displayBuffer.getLineCount()).toBe 100 + originalLineCount describe "soft wrapping", -> beforeEach -> diff --git a/src/app/display-buffer.coffee b/src/app/display-buffer.coffee index 27ec8baab..f22f286ef 100644 --- a/src/app/display-buffer.coffee +++ b/src/app/display-buffer.coffee @@ -288,14 +288,14 @@ class DisplayBuffer # Public: Gets the number of lines in the buffer. # # Returns a {Number}. - lineCount: -> - @lineMap.screenLineCount() + getLineCount: -> + @lineMap.getScreenLineCount() # Public: Gets the number of the last row in the buffer. # # Returns a {Number}. getLastRow: -> - @lineCount() - 1 + @getLineCount() - 1 # Public: Gets the length of the longest screen line. # diff --git a/src/app/edit-session.coffee b/src/app/edit-session.coffee index c536e0eb4..69e2aa3b8 100644 --- a/src/app/edit-session.coffee +++ b/src/app/edit-session.coffee @@ -410,7 +410,7 @@ class EditSession # Public: Gets the number of screen rows. # # Returns a {Number}. - screenLineCount: -> @displayBuffer.lineCount() + getScreenLineCount: -> @displayBuffer.getLineCount() # Public: Gets the length of the longest screen line. # # Returns a {Number}. diff --git a/src/app/editor.coffee b/src/app/editor.coffee index caec03db8..2ad8c1294 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -492,7 +492,7 @@ class Editor extends View # Public: Gets the number of screen rows. # # Returns a {Number}. - screenLineCount: -> @activeEditSession.screenLineCount() + getScreenLineCount: -> @activeEditSession.getScreenLineCount() # Public: Defines the limit at which the buffer begins to soft wrap text. # # softWrapColumn - A {Number} defining the soft wrap limit @@ -887,7 +887,7 @@ class Editor extends View # Public: Scrolls the editor to the bottom. scrollToBottom: -> - @scrollBottom(@screenLineCount() * @lineHeight) + @scrollBottom(@getScreenLineCount() * @lineHeight) # Public: Scrolls the editor to the position of the most recently added cursor. # @@ -1156,7 +1156,7 @@ class Editor extends View fragment.remove() updateLayerDimensions: -> - height = @lineHeight * @screenLineCount() + height = @lineHeight * @getScreenLineCount() unless @layerHeight == height @renderedLines.height(height) @underlayer.css('min-height', height) diff --git a/src/app/line-map.coffee b/src/app/line-map.coffee index 95e7145c0..163e85133 100644 --- a/src/app/line-map.coffee +++ b/src/app/line-map.coffee @@ -62,14 +62,14 @@ class LineMap bufferRows - screenLineCount: -> + getScreenLineCount: -> @screenLines.length # Retrieves the last screen row in the buffer. # # Returns an {Integer}. lastScreenRow: -> - @screenLineCount() - 1 + @getScreenLineCount() - 1 clipScreenPosition: (screenPosition, options={}) -> { wrapBeyondNewlines, wrapAtSoftNewlines } = options