private void indicate(string pattern, Action targetTransform = null)
{
textBox.TargetWholeDocument();
while (textBox.SearchInTarget(pattern) != -1)
{
// Invoke transformation, if any was submitted
targetTransform?.Invoke();
// Only indicate if there's something to indicate
if (textBox.TargetStart != textBox.TargetEnd)
textBox.IndicatorFillRange(textBox.TargetStart, textBox.TargetEnd - textBox.TargetStart);
textBox.TargetStart = textBox.TargetEnd;
textBox.TargetEnd = textBox.TextLength;
}
}