mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Focus the active editor when the file finder is closed
This commit is contained in:
@@ -394,11 +394,11 @@ describe "RootView", ->
|
||||
expect(editor1.buffer.path).not.toBe expectedPath
|
||||
expect(editor2.buffer.path).not.toBe expectedPath
|
||||
|
||||
# debugger
|
||||
rootView.fileFinder.trigger 'file-finder:select-file'
|
||||
|
||||
expect(editor1.buffer.path).not.toBe expectedPath
|
||||
expect(editor2.buffer.path).toBe expectedPath
|
||||
expect(editor2.isFocused).toBeTruthy()
|
||||
|
||||
describe "keymap wiring", ->
|
||||
commandHandler = null
|
||||
|
||||
@@ -71,3 +71,7 @@ class FileFinder extends View
|
||||
paths = (pathAndScore.path for pathAndScore in scoredPaths when pathAndScore.score > 0)
|
||||
|
||||
paths.slice 0, @maxResults
|
||||
|
||||
remove: ->
|
||||
$('#panes .editor.active').focus()
|
||||
super
|
||||
|
||||
@@ -185,7 +185,6 @@ class RootView extends View
|
||||
if @fileFinder and @fileFinder.parent()[0]
|
||||
@fileFinder.remove()
|
||||
@fileFinder = null
|
||||
@activeEditor().focus()
|
||||
else
|
||||
@project.getFilePaths().done (paths) =>
|
||||
relativePaths = (path.replace(@project.path, "") for path in paths)
|
||||
|
||||
Reference in New Issue
Block a user