         @cachedItems = items if @provider.supportCacheItems
         items
 
-    filterSpec = getFilterSpecForQuery(@getQuery())
+    filterSpec = getFilterSpecForQuery(@lastQuery = @getQuery())
     if @provider.updateGrammarOnQueryChange
       @grammar.update(filterSpec.include) # No need to highlight excluded items
 


  constructor: (@provider, {@query, @activate, @pending}={}) ->
    @titleNumber = @constructor.getNextTitleNumber()
    @pending ?= false
    @activate ?= true
    @disposables = new CompositeDisposable


  syncToEditor: (editor) ->
    return if @preventSyncToEditor
    if item = @findClosestItemForEditor(editor)
      @selectItem(item)
      {row} = @editor.getCursorBufferPosition()
