Fixes #523. Submitting an empty query should not get added to search history.