Refactor to reverse internal enumeration order.
Refactor to reverse internal enumeration order.

This is a pure refactoring patch and does note change any functionality.

We remove an unnecessary reversal of the history match array by swapping
the enumeration order of match indices. Older entries now have higher
internal indices than younger entries, and hence we start from 1.

Also removed one unreachable elif clause each from search-up and
search-down.

joshuarubin/dotfiles,joshuarubin/dotfiles,joshuarubin/dotfiles,joshuarubin/dotfiles