mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
TreeView starts with root being selected
This commit is contained in:
@@ -43,6 +43,9 @@ describe "TreeView", ->
|
||||
expect(rootEntries.find('> .file:contains(sample.js)')).toExist()
|
||||
expect(rootEntries.find('> .file:contains(sample.txt)')).toExist()
|
||||
|
||||
it "selects the rootview", ->
|
||||
expect(treeView.selectedEntry()).toEqual treeView.root
|
||||
|
||||
describe "when the project has no path", ->
|
||||
beforeEach ->
|
||||
treeView.deactivate()
|
||||
|
||||
@@ -56,6 +56,8 @@ class TreeView extends View
|
||||
@on 'tree-view:unfocus', => @rootView.activeEditor()?.focus()
|
||||
@rootView.on 'tree-view:focus', => this.focus()
|
||||
|
||||
@selectEntry(@root)
|
||||
|
||||
afterAttach: (onDom) ->
|
||||
@focus() if @focusAfterAttach
|
||||
|
||||
|
||||
Reference in New Issue
Block a user