Skip to content

Commit 8fcca3e

Browse files
committed
Fix navigator not listing new document in workspace until after refresh
1 parent 5d5c80c commit 8fcca3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ide.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,6 +2310,7 @@ export class IDE {
23102310
neueNode[attr] = navNode[attr];
23112311
}
23122312
neueNode.id = neueId;
2313+
neueNode.name = neueId.split("/").pop();
23132314
neueNode.children = [];
23142315
this.navigator.nodes[neueId] = neueNode;
23152316
}
@@ -2325,6 +2326,9 @@ export class IDE {
23252326

23262327
this.saveDocument();
23272328
this.navigator.loadDocument(neueId, neueId);
2329+
2330+
// @FIXME: Will break in multi-workspace.
2331+
this.navigator.nodes[this.navigator.rootId].children.push(neueId);
23282332
}
23292333

23302334
saveToGist() {

0 commit comments

Comments
 (0)