From 630c6a90ebecb1615f0d01adfaba26a4ca2423bf Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 29 Jan 2024 15:37:47 +0100 Subject: [PATCH] Refresh the parent node --- tree-view-sample/src/jsonOutline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree-view-sample/src/jsonOutline.ts b/tree-view-sample/src/jsonOutline.ts index 8522088b..92619d4e 100644 --- a/tree-view-sample/src/jsonOutline.ts +++ b/tree-view-sample/src/jsonOutline.ts @@ -76,7 +76,7 @@ export class JsonOutlineProvider implements vscode.TreeDataProvider { path.pop(); const node = path.length ? json.findNodeAtLocation(this.tree, path) : void 0; this.parseTree(); - this._onDidChangeTreeData.fire(node ? node.offset : void 0); + this._onDidChangeTreeData.fire(node?.parent ? node.parent.offset : void 0); } } }