Skip to content

Commit 5bf9197

Browse files
committed
Fixes overly-aggressive auto-collapse for "Collapse to Definitions"
1 parent cbeea38 commit 5bf9197

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
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)