Make sure we pan immediately when a search result is clicked

Fixes #763