mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Don't change the selection when expanding directories
This commit is contained in:
@@ -64,12 +64,6 @@ describe "TreeView", ->
|
||||
# collapsed descendants remain collapsed
|
||||
expect(rootDirectoryView.find('> .entries > li.contains(zed/) > .entries')).not.toExist()
|
||||
|
||||
it "selects file entries that correspond to the path of the active editor's buffer", ->
|
||||
rootDirectoryView.collapse()
|
||||
rootView.open(require.resolve 'fixtures/sample.js')
|
||||
rootDirectoryView.disclosureArrow.click()
|
||||
expect(rootDirectoryView.entries.find('li:contains(sample.js)')).toHaveClass 'selected'
|
||||
|
||||
describe "when a file is clicked", ->
|
||||
it "opens it in the active editor and selects it", ->
|
||||
expect(rootView.activeEditor()).toBeUndefined()
|
||||
|
||||
@@ -20,7 +20,6 @@ class TreeView extends View
|
||||
false
|
||||
|
||||
@on 'move-down', => @moveDown()
|
||||
@on 'tree-view:expand-directory', => @selectActiveFile()
|
||||
@rootView.on 'active-editor-path-change', => @selectActiveFile()
|
||||
|
||||
selectActiveFile: ->
|
||||
@@ -73,7 +72,6 @@ class DirectoryView extends View
|
||||
@buildEntries()
|
||||
@deserializeEntries(@entryStates) if @entryStates?
|
||||
@isExpanded = true
|
||||
@trigger 'tree-view:expand-directory'
|
||||
false
|
||||
|
||||
collapse: ->
|
||||
|
||||
Reference in New Issue
Block a user