Search history with up and down keys