tweak filefinder, hey it still works

This commit is contained in:
Chris Wanstrath
2011-11-12 19:23:31 -08:00
parent 223f46fd95
commit 8c5bc71610
2 changed files with 8 additions and 3 deletions

View File

@@ -40,7 +40,10 @@ class FilefinderPane extends Pane
_paths = []
for dir in File.list window.url
continue if /\.git|Cocoa/.test dir
_paths.push File.listDirectoryTree dir
if File.isDirectory dir
_paths.push File.listDirectoryTree dir
else
_paths.push dir
_.reject _.flatten(_paths), (dir) -> File.isDirectory dir
showFinder: ->

View File

@@ -5,8 +5,10 @@ module.exports =
class Filefinder extends Extension
constructor: ->
atom.keybinder.load require.resolve "filefinder/key-bindings.coffee"
atom.on 'project:load', @startup
@pane = new FilefinderPane @
startup: =>
@pane = new FilefinderPane this
toggle: ->
@pane.toggle()
@pane?.toggle()