Add TextEditor::getDecorations and ::getOverlayDecorations

Required for autocomplete upgrades.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Nathan Sobo
2014-11-26 12:17:15 -07:00
parent f2e74f216c
commit 1d6087fcd3
2 changed files with 15 additions and 0 deletions

View File

@@ -1293,6 +1293,18 @@ class TextEditor extends Model
decorationsForScreenRowRange: (startScreenRow, endScreenRow) ->
@displayBuffer.decorationsForScreenRowRange(startScreenRow, endScreenRow)
# Extended: Get all decorations.
#
# Returns an {Array} of {Decoration}s.
getDecorations: ->
@displayBuffer.getDecorations()
# Extended: Get all decorations of type 'overlay'.
#
# Returns an {Array} of {Decoration}s.
getOverlayDecorations: ->
@displayBuffer.getOverlayDecorations()
decorationForId: (id) ->
@displayBuffer.decorationForId(id)