Refactor Editor's cursor connivence methods.

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-03-26 15:36:54 -07:00
parent 7e2933b983
commit 36177e4520
2 changed files with 1 additions and 13 deletions

View File

@@ -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()

View File

@@ -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()