This commit is contained in:
Chris Wanstrath
2011-11-06 22:03:11 -08:00
parent 69c13fa7ec
commit 367e9bdd35
2 changed files with 11 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ class TreePane extends Pane
else
@tree.showDir path
el.addClass 'open'
list = @createList @tree.findPaths path
list = @createList @tree.findPath(path).paths
el.append list
else
el.addClass 'active'

View File

@@ -62,6 +62,16 @@ class Tree extends Extension
Storage.set @shownDirStorageKey(), dirs
@unwatchDir dir, @watchDir
findPath: (searchPath, paths=@paths) ->
found = null
for obj in paths
return found if found
if obj.path is searchPath
found = obj
else if obj.paths
found = @findPath searchPath, obj.paths
found
findPaths: (root) ->
paths = []