Wrap the input history search when search fails. Move point to the first history element for a forward search, or to the last history element for a backward search. (fn)