Added history search on arrow keys