Skip to content

Commit 6c34520

Browse files
author
Benjamin Lichtman
committed
Use normal start for spans for args
1 parent 0dbb976 commit 6c34520

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/outliningElementsCollector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ namespace ts.OutliningElementsCollector {
206206
}
207207

208208
function spanForObjectOrArrayLiteral(node: Node, open: SyntaxKind.OpenBraceToken | SyntaxKind.OpenBracketToken = SyntaxKind.OpenBraceToken): OutliningSpan | undefined {
209-
// If the block has no leading keywords and is inside an array literal,
209+
// If the block has no leading keywords and is inside an array literal or call expression,
210210
// we only want to collapse the span of the block.
211211
// Otherwise, the collapsed section will include the end of the previous line.
212-
return spanForNode(node, /*autoCollapse*/ false, /*useFullStart*/ !isArrayLiteralExpression(node.parent), open);
212+
return spanForNode(node, /*autoCollapse*/ false, /*useFullStart*/ !isArrayLiteralExpression(node.parent) && !isCallExpression(node.parent), open);
213213
}
214214

215215
function spanForNode(hintSpanNode: Node, autoCollapse = false, useFullStart = true, open: SyntaxKind.OpenBraceToken | SyntaxKind.OpenBracketToken = SyntaxKind.OpenBraceToken): OutliningSpan | undefined {

0 commit comments

Comments
 (0)