mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Clear array when window receives focus
This commit is contained in:
@@ -59,6 +59,7 @@ class SelectList extends View
|
||||
@loading.text(message).show()
|
||||
|
||||
populateList: ->
|
||||
return unless @hasParent()
|
||||
filterQuery = @miniEditor.getText()
|
||||
if filterQuery.length
|
||||
filteredArray = fuzzyFilter(@array, filterQuery, key: @filterKey)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{View, $$} = require 'space-pen'
|
||||
SelectList = require 'select-list'
|
||||
_ = require 'underscore'
|
||||
$ = require 'jquery'
|
||||
Editor = require 'editor'
|
||||
|
||||
module.exports =
|
||||
@@ -20,6 +21,7 @@ class FuzzyFinder extends SelectList
|
||||
|
||||
initialize: (@rootView) ->
|
||||
super
|
||||
$(window).on 'focus', => @array = null
|
||||
|
||||
itemForElement: (path) ->
|
||||
$$ -> @li path
|
||||
@@ -39,8 +41,8 @@ class FuzzyFinder extends SelectList
|
||||
else
|
||||
return unless @rootView.project.getPath()?
|
||||
@allowActiveEditorChange = false
|
||||
@populateProjectPaths()
|
||||
@attach()
|
||||
@populateProjectPaths()
|
||||
|
||||
toggleBufferFinder: ->
|
||||
if @hasParent()
|
||||
|
||||
Reference in New Issue
Block a user