revert of breaking change wrt backspace

This commit is contained in:
daboe01
2014-08-14 18:21:53 +02:00
parent 5f0be0cc7f
commit ce69410f49
+3 -6
View File
@@ -1211,12 +1211,9 @@ var kDelegateRespondsTo_textShouldBeginEditing
else
changedRange = _selectionRange;
var isCharacterAtLocationIndex = [self _isCharacterAtIndex:(changedRange.location - 1) granularity:_previousSelectionGranularity],
isCharacterAtMaxIndex = [self _isCharacterAtIndex:CPMaxRange(changedRange) granularity:_previousSelectionGranularity],
stringLength = [[self string] length];
if ((_previousSelectionGranularity > 0) && (changedRange.location > 0) && isCharacterAtLocationIndex &&
(changedRange.location < stringLength) && isCharacterAtMaxIndex)
if (_previousSelectionGranularity > 0 &&
changedRange.location > 0 && [self _isCharacterAtIndex:(changedRange.location - 1) granularity:_previousSelectionGranularity] &&
changedRange.location < [[self string] length] && [self _isCharacterAtIndex:CPMaxRange(changedRange) granularity:_previousSelectionGranularity])
{
changedRange.length++;
}