mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
💄 getter renames
This commit is contained in:
@@ -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 ->
|
||||
|
||||
@@ -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.
|
||||
#
|
||||
|
||||
@@ -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}.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user