diff --git a/src/app/text-mate-scope-selector-matchers.coffee b/src/app/text-mate-scope-selector-matchers.coffee index c5cb5c6ae..8191c36d7 100644 --- a/src/app/text-mate-scope-selector-matchers.coffee +++ b/src/app/text-mate-scope-selector-matchers.coffee @@ -22,12 +22,12 @@ class ScopeMatcher matches: (scope) -> scopeSegments = scope.split('.') - if scopeSegments.length < @segments.length - return false + return false if scopeSegments.length < @segments.length + for segment, index in @segments - unless segment.matches(scopeSegments[index]) - return false + return false unless segment.matches(scopeSegments[index]) + true class PathMatcher