Display relative paths in the file finder

This commit is contained in:
Corey Johnson
2012-01-05 11:01:17 -08:00
parent 192166d61a
commit 4121b2076e
2 changed files with 25 additions and 5 deletions

View File

@@ -37,7 +37,8 @@ class RootView extends Template
@fileFinder.remove()
@fileFinder = null
else
@project.getFilePaths().done (urls) =>
@fileFinder = FileFinder.build({urls, selected: (url) => @editor.open(url)})
@project.getFilePaths().done (paths) =>
relativePaths = (path.replace(@project.url, "") for path in paths)
@fileFinder = FileFinder.build({urls: relativePaths, selected: (relativePath) => @editor.open(@project.url + relativePath)})
@addPane(@fileFinder)
@fileFinder.input.focus()