Skip to content

Commit

Permalink
Merge pull request #141 from kishikawakatsumi/reload
Browse files Browse the repository at this point in the history
Fix reload specific path
  • Loading branch information
kishikawakatsumi authored Sep 18, 2024
2 parents 6de99b3 + 64921f3 commit c78f232
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ class DirectoryStructure {
await expand(fileNode, outlineView)
} else {
let nodes = await listDirectory(path: path, parent: nil)
let rootNodes = tree.rootNodes()

tree.nodes = Array(Set(rootNodes).union(nodes))
tree.nodes = Array(
Set(tree.nodes)
.subtracting(tree.rootNodes())
.union(nodes)
)
viewTree = viewTree(tree)

outlineView.reloadData()
Expand Down

0 comments on commit c78f232

Please sign in to comment.