internal void GetFirstTextEffectedByEditRecursive(XElement Xml, int index, ref int count, ref Text theOne, EditType type = EditType.ins) { count += HelperFunctions.GetSize(Xml); if (count > 0 && ((type == EditType.del && count > index) || (type == EditType.ins && count >= index))) { theOne = new Text(base.Document, Xml, count - HelperFunctions.GetSize(Xml)); } else if (Xml.HasElements) { foreach (XElement item in Xml.Elements()) { if (theOne == null) { GetFirstTextEffectedByEditRecursive(item, index, ref count, ref theOne); } } } }