diff --git a/src/editor.coffee b/src/editor.coffee index fdeeded2b..125f6c336 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -1389,9 +1389,18 @@ class Editor extends Model @displayBuffer.reloadGrammar() ### - Section: Syntatic Queries + Section: Managing Syntax Scopes ### + # Public: Get the syntactic scopes for the most recently added cursor's + # position. See {::scopesForBufferPosition} for more information. + # + # Returns an {Array} of {String}s. + scopesAtCursor: -> @getLastCursor().getScopes() + getCursorScopes: -> + deprecate 'Use Editor::scopesAtCursor() instead' + @scopesAtCursor() + # Essential: Get the syntactic scopes for the given position in buffer # coordinates. # @@ -1404,7 +1413,7 @@ class Editor extends Model # Returns an {Array} of {String}s. scopesForBufferPosition: (bufferPosition) -> @displayBuffer.scopesForBufferPosition(bufferPosition) - # Essential: Get the range in buffer coordinates of all tokens surrounding the + # Extended: Get the range in buffer coordinates of all tokens surrounding the # cursor that match the given scope selector. # # For example, if you wanted to find the string surrounding the cursor, you @@ -1414,15 +1423,6 @@ class Editor extends Model bufferRangeForScopeAtCursor: (selector) -> @displayBuffer.bufferRangeForScopeAtPosition(selector, @getCursorBufferPosition()) - # Public: Get the syntactic scopes for the most recently added cursor's - # position. See {::scopesForBufferPosition} for more information. - # - # Returns an {Array} of {String}s. - scopesAtCursor: -> @getLastCursor().getScopes() - getCursorScopes: -> - deprecate 'Use Editor::scopesAtCursor() instead' - @scopesAtCursor() - logCursorScope: -> console.log @getCursorScopes()