void (final int oldTextLength, final int newTextLength) { if (myResultTextRange == null) return; int thisChange = newTextLength - oldTextLength; myDelta += thisChange; myResultTextRange = new TextRange(myResultTextRange.getStartOffset(), myResultTextRange.getEndOffset() + thisChange); }