mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
opening file/dir works again.
but I don't like it. I feel like opening a file or directory should create a new window, unless the file or directory you are opening is contained in the current projects dir.
This commit is contained in:
@@ -18,7 +18,10 @@ class Project extends Pane
|
||||
'Command-Ctrl-N': 'toggle'
|
||||
|
||||
initialize: ->
|
||||
@dir = File.workingDirectory()
|
||||
@reload(File.workingDirectory())
|
||||
|
||||
activeWindow.document.ace.on 'open', ({filename}) =>
|
||||
@reload filename if File.isDirectory filename
|
||||
|
||||
$('#project li').live 'click', (event) =>
|
||||
$('#project .active').removeClass 'active'
|
||||
@@ -38,8 +41,10 @@ class Project extends Pane
|
||||
|
||||
false # Don't bubble!
|
||||
|
||||
reload: (dir) ->
|
||||
@dir = dir
|
||||
@html.children('#project .cwd').text _.last @dir.split '/'
|
||||
@html.children('#project li').remove()
|
||||
@html.children('#project .files').empty()
|
||||
@html.children('#project .files').append @createList @dir
|
||||
|
||||
createList: (dir) ->
|
||||
|
||||
Reference in New Issue
Block a user