Deprecate getCursorScreenRow

It’s out of place, and unnecessary.
This commit is contained in:
Ben Ogle
2014-08-28 14:43:36 -07:00
parent db83375293
commit 45a9bd21fc

View File

@@ -1330,7 +1330,7 @@ class Editor extends Model
#
# Returns a {Boolean}.
isFoldedAtCursorRow: ->
@isFoldedAtScreenRow(@getCursorScreenRow())
@isFoldedAtScreenRow(@getCursorScreenPosition().row)
# Public: Determine whether the given row in buffer coordinates is folded.
#
@@ -1553,6 +1553,13 @@ class Editor extends Model
getCursorScreenPosition: ->
@getCursor().getScreenPosition()
# Get the row of the most recently added cursor in screen coordinates.
#
# Returns the screen row {Number}.
getCursorScreenRow: ->
deprecate('Use `editor.getCursorScreenPosition().row` instead')
@getCursorScreenPosition().row
# Essential: Move the cursor to the given position in screen coordinates.
#
# If there are multiple cursors, they will be consolidated to a single cursor.
@@ -1642,12 +1649,6 @@ class Editor extends Model
moveCursorToBeginningOfPreviousParagraph: ->
@moveCursors (cursor) -> cursor.moveToBeginningOfPreviousParagraph()
# Extended: Get the row of the most recently added cursor in screen coordinates.
#
# Returns the screen row {Number}.
getCursorScreenRow: ->
@getCursor().getScreenRow()
# Extended: Returns the word surrounding the most recently added cursor.
#
# * `options` (optional) See {Cursor::getBeginningOfCurrentWordBufferPosition}.