move to right end simplification

This commit is contained in:
daboe01 committed 2015-06-28 15:18:59 +02:00
1 parent 8e0fdf68e4
commit 0c308b38c5
1 file changed
+1 -4
+1 -4
View File
@@ -1229,10 +1229,7 @@ var kDelegateRespondsTo_textShouldBeginEditing
if (!fragment)
return;
var loc = CPMaxRange(fragment._range);
if (loc > 0 && loc < [_layoutManager numberOfCharacters])
loc = MAX(0, loc - 1);
var loc = MAX(0, CPMaxRange(fragment._range) - 1);
[self _establishSelection:CPMakeRange(loc, 0) byExtending:flag];
}