Add getters for decoration types in addition to ‘overlay’

This commit is contained in:
Nathan Sobo
2014-12-02 15:58:54 -07:00
parent eb223c4f21
commit dd63d47c11
2 changed files with 27 additions and 0 deletions

View File

@@ -1314,6 +1314,24 @@ class TextEditor extends Model
getDecorations: ->
@displayBuffer.getDecorations()
# Extended: Get all decorations of type 'line'.
#
# Returns an {Array} of {Decoration}s.
getLineDecorations: ->
@displayBuffer.getLineDecorations()
# Extended: Get all decorations of type 'gutter'.
#
# Returns an {Array} of {Decoration}s.
getGutterDecorations: ->
@displayBuffer.getGutterDecorations()
# Extended: Get all decorations of type 'highlight'.
#
# Returns an {Array} of {Decoration}s.
getHighlightDecorations: ->
@displayBuffer.getHighlightDecorations()
# Extended: Get all decorations of type 'overlay'.
#
# Returns an {Array} of {Decoration}s.