Hitting enter on FileFinder opens file in new window.

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-01-03 17:07:24 -08:00
parent f0976d4650
commit 44802e9647
2 changed files with 20 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ class FileFinder extends Template
@populateUrlList()
@bindKey 'up', 'moveUp'
@bindKey 'down', 'moveDown'
@bindKey 'enter', 'select'
populateUrlList: ->
@urlList.empty()
@@ -31,6 +32,11 @@ class FileFinder extends Template
findSelectedLi: ->
@urlList.children('li.selected')
select: ->
filePath = @findSelectedLi().text()
atom.open filePath if filePath
moveUp: ->
@findSelectedLi()
.filter(':not(:first-child)')