       .then (packages=[]) =>
         @highlightExactMatch(@resultsContainer, query, packages)
       .then (packages=[]) =>
+        @addCloseMatches(@resultsContainer, query, packages)
+      .then (packages=[]) =>
         @addPackageViews(@resultsContainer, packages)
       .catch (error) =>
         @searchMessage.hide()

      null

  performSearch: ->
    if query = @searchEditorView.getText().trim()
      @performSearchForQuery(query)

  performSearchForQuery: (query) ->


    packages

  addCloseMatches: (container, query, packages) ->
    matches = _.filter(packages, (pkg) -> pkg.name.indexOf(query) >= 0)

    for pack in matches
      packageCard = @getPackageCardView(pack)
      @addPackageCardView(container, packageCard)
      packages.splice(packages.indexOf(pack), 1)

    packages

  addPackageViews: (container, packages) ->
    for pack in packages
      packageCard = @getPackageCardView(pack)
      @addPackageCardView(container, packageCard)

