mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
💄
This commit is contained in:
@@ -17,8 +17,8 @@ describe "RootView", ->
|
||||
expect(rootView.editor.buffer.url).toBe url
|
||||
|
||||
describe "when called with a url that references a directory", ->
|
||||
it "creates a project for the directory and opens and empty buffer", ->
|
||||
url = require.resolve 'fixtures/dir'
|
||||
it "creates a project for the directory and opens an empty buffer", ->
|
||||
url = require.resolve 'fixtures/dir/'
|
||||
rootView = RootView.build {url}
|
||||
|
||||
expect(rootView.project.url).toBe url
|
||||
|
||||
@@ -21,14 +21,9 @@ class RootView extends Template
|
||||
@bindKey 'meta+w', => window.close()
|
||||
@bindKey 'meta+t', => @toggleFileFinder()
|
||||
|
||||
if not url
|
||||
# not sure what to do
|
||||
else if fs.isDirectory url
|
||||
@project = new Project url
|
||||
@editor.open()
|
||||
else
|
||||
if url
|
||||
@project = new Project(fs.directory(url))
|
||||
@editor.open url
|
||||
@editor.open(url) if fs.isFile(url)
|
||||
|
||||
addPane: (view) ->
|
||||
pane = $('<div class="pane">')
|
||||
|
||||
Reference in New Issue
Block a user