Skip to content

Commit

Permalink
fix #50321
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed May 29, 2018
1 parent 7f0f6e1 commit f5300ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/workbench/api/node/extHostLanguageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ class OutlineAdapter {
let parentStack: Hierarchy<SymbolInformation2>[] = [];
for (let i = 0; i < info.length; i++) {
let element = new Hierarchy(new SymbolInformation2(info[i].name, '', info[i].kind, info[i].location.range, info[i].location));
element.parent.containerName = info[i].containerName;
while (true) {
if (parentStack.length === 0) {
parentStack.push(element);
res.push(element);
break;
}
let parent = parentStack[parentStack.length - 1];
if (parent.parent.range.contains(element.parent.range)) {
if (parent.parent.range.contains(element.parent.range) && !parent.parent.range.isEqual(element.parent.range)) {
parent.children.push(element);
parentStack.push(element);
break;
Expand Down

0 comments on commit f5300ce

Please sign in to comment.