mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Refactor Editor's cursor connivence methods.
This commit is contained in:
@@ -31,15 +31,9 @@ class CompositeCursor
|
||||
setScreenPosition: (screenPosition) ->
|
||||
@modifyCursors (cursor) -> cursor.setScreenPosition(screenPosition)
|
||||
|
||||
getScreenPosition: ->
|
||||
@cursors[0].getScreenPosition()
|
||||
|
||||
setBufferPosition: (bufferPosition) ->
|
||||
@modifyCursors (cursor) -> cursor.setBufferPosition(bufferPosition)
|
||||
|
||||
getBufferPosition: ->
|
||||
@cursors[0].getBufferPosition()
|
||||
|
||||
refreshScreenPosition: ->
|
||||
@modifyCursors (cursor) -> cursor.refreshScreenPosition()
|
||||
|
||||
|
||||
@@ -351,14 +351,8 @@ class Editor extends View
|
||||
|
||||
setCursorScreenPosition: (position) -> @compositeCursor.setScreenPosition(position)
|
||||
getCursorScreenPosition: -> @getCursor().getScreenPosition()
|
||||
setCursorBufferPosition: (position) -> @getCursor().setBufferPosition(position)
|
||||
setCursorBufferPosition: (position) -> @compositeCursor.setBufferPosition(position)
|
||||
getCursorBufferPosition: -> @getCursor().getBufferPosition()
|
||||
setCursorScreenRow: (row) -> @getCursor().setScreenRow(row)
|
||||
getCursorScreenRow: -> @getCursor().getScreenRow()
|
||||
getCursorBufferRow: -> @getCursor().getBufferPosition().row
|
||||
getCursorScreenColumn: -> @getCursor().getScreenColumn()
|
||||
setCursorBufferColumn: (column) -> @getCursor().setBufferColumn(column)
|
||||
getCursorBufferColumn: -> @getCursor().getBufferColumn()
|
||||
|
||||
getSelection: (index) -> @compositeSelection.getSelection(index)
|
||||
getSelectedText: -> @compositeSelection.getSelection().getText()
|
||||
|
||||
Reference in New Issue
Block a user