The editor for which we are searching.
The scroller holding the document.
The editor for which we are searching.
The scroller holding the document.
Whether we can replace the current hit. If there is no hit, then this is
false
. If the hit is somehow collapsed, this is also
false
. Otherwise, the hit must be a well-formed range.
The current match. This is undefined
if we have not searched yet. It
is null
if nothing matches.
Clear the highlight that this object produced to mark a hit.
Find the next hit in the direction of the search. This updates current.
The search options.
Replace the current hit with text.
The new text.
Set the caret position to the latest hit we ran into.
Update the highlight marking the current hit.
Update the pattern to a new value. Calling this method attempts to update the current hit first, and may move in the direction of the search if updating the current hit is not possible. This updates current.
The new pattern value.
The search options.
Generated using TypeDoc
A search-and-replace engine for editor instances. This implements the code that is common to quick searches and more complex searches. This object is responsible for maintaining a search position in the document, and replacing hits as required.