The number of matches for the current query.
The index of the highlighted match, or -1 when there is none.
Move to the next match (wrapping), selecting it; returns whether one was found.
Move to the previous match (wrapping), selecting it; returns whether one was found.
Replace the current match with replacement; returns whether the text changed.
Replace every match with replacement; returns the number of occurrences changed.
Re-run the search with a new query and/or flags; returns the match count.
A headless find/replace session over the document body. Created by Document.find. Navigation moves the document selection onto each match; replace rewrites the matching text (adopting the match's leading-run formatting) and repaints. The session is stateful in the engine — one is live at a time, so re-query with FindSession.refresh rather than juggling several.
flagsbits:1= match case,2= whole word.