When the document is very big and there is no early match while you enter the
search pattern the GUI hangs as long the search is running after each key
stroke. This patch break the document in smaller chunks to search to return fast
enough to the event loop to update user input.
- Disable next/prev buttons when not match
- Only save search history on some change