Skip to content

Commit

Permalink
Merge pull request #2116 from Microsoft/fix-autoCollapse
Browse files Browse the repository at this point in the history
Fixes overly-aggressive auto-collapse for "Collapse to Definitions"
  • Loading branch information
rbuckton committed Feb 23, 2015
2 parents 4aae41b + 5bf9197 commit a27d19d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/services/outliningElementsCollector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,7 @@ module ts {
}

function autoCollapse(node: Node) {
switch (node.kind) {
case SyntaxKind.ModuleBlock:
case SyntaxKind.ClassDeclaration:
case SyntaxKind.InterfaceDeclaration:
case SyntaxKind.EnumDeclaration:
return false;
}

return true;
return isFunctionBlock(node) && node.parent.kind !== SyntaxKind.ArrowFunction;
}

var depth = 0;
Expand Down

0 comments on commit a27d19d

Please sign in to comment.