8000 Merge pull request #2116 from Microsoft/fix-autoCollapse · ezhangle/TypeScript@a27d19d · GitHub
[go: up one dir, main page]

Skip to content

Commit a27d19d

Browse files
committed
Merge pull request microsoft#2116 from Microsoft/fix-autoCollapse
Fixes overly-aggressive auto-collapse for "Collapse to Definitions"
2 parents 4aae41b + 5bf9197 commit a27d19d

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/services/outliningElementsCollector.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,7 @@ module ts {
3232
}
3333

3434
83F8 function autoCollapse(node: Node) {
35-
switch (node.kind) {
36-
case SyntaxKind.ModuleBlock:
37-
case SyntaxKind.ClassDeclaration:
38-
case SyntaxKind.InterfaceDeclaration:
39-
case SyntaxKind.EnumDeclaration:
40-
return false;
41-
}
42-
43-
return true;
35+
return isFunctionBlock(node) && node.parent.kind !== SyntaxKind.ArrowFunction;
4436
}
4537

4638
var depth = 0;

0 commit comments

Comments
 (0)
0