a couple of fixes based on review comments
changing the centering behavior to only center when the cursor is
either near the edges of the viewport or outside of it entirely.
This results in less hopping around when performing searches.