💄 getter renames

This commit is contained in:
Nathan Sobo
2013-04-25 12:12:32 -06:00
parent c50b7fd99e
commit ca3b0c97da
5 changed files with 11 additions and 11 deletions

View File

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

View File

@@ -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.
#

View File

@@ -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}.

View File

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

View File

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