mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Deprecate getCursorScreenRow
It’s out of place, and unnecessary.
This commit is contained in:
@@ -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}.
|
||||
|
||||
Reference in New Issue
Block a user