diff --git a/src/editor.coffee b/src/editor.coffee index aac77bda1..c24a7bc76 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -1514,20 +1514,6 @@ class Editor extends Model hasMultipleCursors: -> @getCursors().length > 1 - # Essential: Add a cursor at the given position in buffer coordinates. - # - # Returns a {Cursor}. - addCursorAtBufferPosition: (bufferPosition) -> - @markBufferPosition(bufferPosition, @getSelectionMarkerAttributes()) - @getLastSelection().cursor - - # Essential: Add a cursor at the position in screen coordinates. - # - # Returns a {Cursor}. - addCursorAtScreenPosition: (screenPosition) -> - @markScreenPosition(screenPosition, @getSelectionMarkerAttributes()) - @getLastSelection().cursor - # Essential: Get the position of the most recently added cursor in buffer # coordinates. # @@ -1571,6 +1557,20 @@ class Editor extends Model setCursorScreenPosition: (position, options) -> @moveCursors (cursor) -> cursor.setScreenPosition(position, options) + # Essential: Add a cursor at the given position in buffer coordinates. + # + # Returns a {Cursor}. + addCursorAtBufferPosition: (bufferPosition) -> + @markBufferPosition(bufferPosition, @getSelectionMarkerAttributes()) + @getLastSelection().cursor + + # Essential: Add a cursor at the position in screen coordinates. + # + # Returns a {Cursor}. + addCursorAtScreenPosition: (screenPosition) -> + @markScreenPosition(screenPosition, @getSelectionMarkerAttributes()) + @getLastSelection().cursor + # Essential: Move every cursor up one row in screen coordinates. moveCursorUp: (lineCount) -> @moveCursors (cursor) -> cursor.moveUp(lineCount, moveToEndOfSelection: true)