     return unless @items?
 
     filterQuery = @getFilterQuery()
-    if filterQuery.length
-      filteredItems = @filter(filterQuery)
-      #filteredItems = fuzzyFilter(@items, filterQuery, key: @getFilterKey())
-    else
-      filteredItems = @items
+    filteredItems = @filter(filterQuery)
+    selectedItem = @selectItem(filterQuery)
 
     @list.empty()
     if filteredItems.length

    @addClass('notational-velocity from-top overlay')
    @loadData()

  filter: (filterQuery) ->
    queries = []

    for queryStr in filterQuery.split(' ')
      if queryStr.length
        queries.push(new RegExp(queryStr, 'gim'))

    perfs = []
    for item,i in @items
      perfs.push({score: 1, index: i})

    # The most recent one comes to the top.
    for query in queries
      for perf in perfs
        if @items[perf.index].filetext.match(query) != null || @items[perf.index].title.match(query) != null
          perf.score = @items[perf.index].modified
        else
          perf.score = 0

        # This snippet implements a manual relevance metric.
        # result = @items[perf.index].filetext.match(query)
        # if result == null
        #   perf.score = 0
        #   continue
        # perf.score *= result.length
        # result = @items[perf.index].title.match(query)
        # if result != null
        #   perf.score *= 10

      perfs = perfs.filter (x) -> x.score > 0

    perfs.sort (a, b) -> if a.score > b.score then -1 else 1

    return (@items[p.index] for p in perfs)

  loadData: ->
    @data = []

        itemView.data('select-list-item', item)
        @list.append(itemView)

      if selectedItem
        n = filteredItems.indexOf(selectedItem) + 1
        @selectItemView(@list.find("li:nth-child(#{n})"))

    else
      @setError(@getEmptyMessage(@items.length, filteredItems.length))
