mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge branch 'master' of github.com:github/atom
This commit is contained in:
@@ -16,10 +16,14 @@ class FileFinder extends View
|
||||
initialize: ({@urls, @selected}) ->
|
||||
requireStylesheet 'file-finder.css'
|
||||
@maxResults = 10
|
||||
@previousFocusedElement = $(document.activeElement)
|
||||
|
||||
@populateUrlList()
|
||||
window.keymap.bindKeys ".file-finder .editor",
|
||||
'enter': 'file-finder:select-file'
|
||||
'enter': 'file-finder:select-file',
|
||||
'escape': 'file-finder:close'
|
||||
|
||||
@on 'file-finder:close', => @remove()
|
||||
@on 'move-up', => @moveUp()
|
||||
@on 'move-down', => @moveDown()
|
||||
@on 'file-finder:select-file', => @select()
|
||||
@@ -43,6 +47,10 @@ class FileFinder extends View
|
||||
@selected(filePath) if filePath and @selected
|
||||
@remove()
|
||||
|
||||
remove: ->
|
||||
super()
|
||||
@previousFocusedElement.focus()
|
||||
|
||||
moveUp: ->
|
||||
@findSelectedLi()
|
||||
.filter(':not(:first-child)')
|
||||
|
||||
Reference in New Issue
Block a user