Moving up in tree view doesn't skip over files inside of directories

This commit is contained in:
Corey Johnson
2012-05-04 14:56:41 -07:00
parent 37438c6da8
commit 2229c4be21
2 changed files with 15 additions and 3 deletions

View File

@@ -85,8 +85,11 @@ class TreeView extends View
moveUp: ->
selectedEntry = @selectedEntry()
if selectedEntry
return if @selectEntry(selectedEntry.prev())
return if @selectEntry(selectedEntry.parents('.directory').first())
if previousEntry = @selectEntry(selectedEntry.prev())
if previousEntry.is('.expanded.directory')
@selectEntry(previousEntry.find('.entry:last'))
else
@selectEntry(selectedEntry.parents('.directory').first())
else
@selectEntry(@find('.entry').last())