TextRange () { TextRange range = myOriginal.getTextRange(); if (myRange != null) { range = range.intersection(myRange); } int start = myOffset + range.getStartOffset() - (myRange != null ? myRange.getStartOffset() : 0); return TextRange.from(start, range.getLength()); }