From 049531e49599dc8b3c8fcbb8f448dc69ff8fd853 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 6 Jun 2014 14:18:33 -0700 Subject: [PATCH] Add comment --- src/display-buffer.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index 6ab46b431..b805ec4f0 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -758,6 +758,12 @@ class DisplayBuffer extends Model @removeDecorationFromBufferRow(bufferRow, decoration) return + # Finds all decorations on a buffer row that match a `decorationPattern` + # + # bufferRow - the {int} buffer row + # decorationPattern - the {Object} decoration type to filter by eg. `{type: 'gutter', class: 'linter-error'}` + # + # Returns an {Array} of the matching decorations findDecorationsForBufferRow: (bufferRow, decorationPattern) -> return unless @decorations[bufferRow] decoration for decoration in @decorations[bufferRow] when @decorationMatchesPattern(decoration, decorationPattern)