Skip to content

Commit bf3fbe3

Browse files
committed
adressed CR feedback: use pos instead of full start
1 parent 5e0221e commit bf3fbe3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/services/outliningElementsCollector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module ts {
4040
if (node && startElement && endElement) {
4141
var span: OutliningSpan = {
4242
textSpan: TypeScript.TextSpan.fromBounds(startElement.pos, endElement.end),
43-
hintSpan: TypeScript.TextSpan.fromBounds(node.getFullStart(), node.end),
43+
hintSpan: TypeScript.TextSpan.fromBounds(node.pos, node.end),
4444
bannerText: "...",
4545
autoCollapse: false
4646
};

src/services/services.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,9 +1014,8 @@ module ts {
10141014
// walk over the nodes and set parent references
10151015
var parent: Node = sourceFile;
10161016
function walk(n: Node): void {
1017-
if (parent) {
1018-
n.parent = parent;
1019-
}
1017+
n.parent = parent;
1018+
10201019
var saveParent = parent;
10211020
parent = n;
10221021
forEachChild(n, walk);

0 commit comments

Comments
 (0)