mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Remove *.getLastCursor()
This commit is contained in:
@@ -57,7 +57,7 @@ class Cursor
|
||||
isVisible: -> @visible
|
||||
|
||||
isLastCursor: ->
|
||||
this == @editSession.getLastCursor()
|
||||
this == @editSession.getCursor()
|
||||
|
||||
autoscrolled: ->
|
||||
@needsAutoscroll = false
|
||||
|
||||
@@ -370,9 +370,6 @@ class EditSession
|
||||
getCursor: ->
|
||||
_.last(@cursors)
|
||||
|
||||
getLastCursor: ->
|
||||
_.last(@cursors)
|
||||
|
||||
addCursorAtScreenPosition: (screenPosition) ->
|
||||
@addCursor(new Cursor(editSession: this, screenPosition: screenPosition))
|
||||
|
||||
@@ -455,16 +452,16 @@ class EditSession
|
||||
@moveCursors (cursor) -> cursor.setScreenPosition(position)
|
||||
|
||||
getCursorScreenPosition: ->
|
||||
@getLastCursor().getScreenPosition()
|
||||
@getCursor().getScreenPosition()
|
||||
|
||||
getCursorScreenRow: ->
|
||||
@getLastCursor().getScreenRow()
|
||||
@getCursor().getScreenRow()
|
||||
|
||||
setCursorBufferPosition: (position, options) ->
|
||||
@moveCursors (cursor) -> cursor.setBufferPosition(position, options)
|
||||
|
||||
getCursorBufferPosition: ->
|
||||
@getLastCursor().getBufferPosition()
|
||||
@getCursor().getBufferPosition()
|
||||
|
||||
getSelectedScreenRange: ->
|
||||
@getLastSelection().getScreenRange()
|
||||
|
||||
@@ -187,7 +187,6 @@ class Editor extends View
|
||||
|
||||
getCursor: -> @activeEditSession.getCursor()
|
||||
getCursors: -> @activeEditSession.getCursors()
|
||||
getLastCursor: -> @activeEditSession.getLastCursor()
|
||||
addCursorAtScreenPosition: (screenPosition) -> @activeEditSession.addCursorAtScreenPosition(screenPosition)
|
||||
addCursorAtBufferPosition: (bufferPosition) -> @activeEditSession.addCursorAtBufferPosition(bufferPosition)
|
||||
moveCursorUp: -> @activeEditSession.moveCursorUp()
|
||||
|
||||
Reference in New Issue
Block a user