adressed CR feedback: use pos instead of full start

This commit is contained in:
Vladimir Matveev 2014-08-11 22:34:58 -07:00
parent 5e0221eeac
commit bf3fbe347a
2 changed files with 3 additions and 4 deletions

View file

@ -40,7 +40,7 @@ module ts {
if (node && startElement && endElement) {
var span: OutliningSpan = {
textSpan: TypeScript.TextSpan.fromBounds(startElement.pos, endElement.end),
hintSpan: TypeScript.TextSpan.fromBounds(node.getFullStart(), node.end),
hintSpan: TypeScript.TextSpan.fromBounds(node.pos, node.end),
bannerText: "...",
autoCollapse: false
};

View file

@ -1014,9 +1014,8 @@ module ts {
// walk over the nodes and set parent references
var parent: Node = sourceFile;
function walk(n: Node): void {
if (parent) {
n.parent = parent;
}
n.parent = parent;
var saveParent = parent;
parent = n;
forEachChild(n, walk);