fix for different projects being open in different windows

This commit is contained in:
Chris Wanstrath
2011-09-09 23:46:41 -07:00
parent 918fbe5db9
commit 25219b8516

View File

@@ -16,8 +16,10 @@ class Project extends Pane
'Command-Ctrl-N': 'toggle'
initialize: ->
activeWindow.document.ace.on 'open', =>
@reload() if @dir? and File.workingDirectory() isnt @dir
@dir = File.workingDirectory()
activeWindow.document.ace.on 'open', ({filename}) =>
@reload() if File.isDirectory filename
$('#project li').live 'click', (event) =>
$('#project .active').removeClass 'active'