For a forward search, continue at the beginning of the buffer if no search occurrence is found.
For a backward search, continue at the end of the buffer.