handle search match at end of buffer.
update search on buffer change.