Skip to content

Commit

Permalink
No longer show subfields not in the same file in the outline view
Browse files Browse the repository at this point in the history
  • Loading branch information
worksofliam committed Feb 16, 2022
1 parent d18355d commit 72b4bbb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/vscode/LanguageWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,15 @@ module.exports = class LanguageWorker {
);

structDef.children.push(
...struct.subItems.map(subitem => new vscode.DocumentSymbol(
subitem.name,
subitem.keywords.join(` `).trim(),
vscode.SymbolKind.Property,
new vscode.Range(subitem.position.line, 0, subitem.position.line, 0),
new vscode.Range(subitem.position.line, 0, subitem.position.line, 0)
))
...struct.subItems
.filter(subitem => subitem.position && subitem.position.path === currentPath)
.map(subitem => new vscode.DocumentSymbol(
subitem.name,
subitem.keywords.join(` `).trim(),
vscode.SymbolKind.Property,
new vscode.Range(subitem.position.line, 0, subitem.position.line, 0),
new vscode.Range(subitem.position.line, 0, subitem.position.line, 0)
))
);

betterDefs.push(structDef);
Expand Down

0 comments on commit 72b4bbb

Please sign in to comment.