diff --git a/AppKit/CPTextView/CPLayoutManager.j b/AppKit/CPTextView/CPLayoutManager.j index 99d403be3..54591368e 100644 --- a/AppKit/CPTextView/CPLayoutManager.j +++ b/AppKit/CPTextView/CPLayoutManager.j @@ -164,7 +164,7 @@ _oncontextmenuhandler = function () { return false; }; if (![self numberOfGlyphs]) return CGRectMake(0, 0, 1, 12); // crude hack to give a cursor in an empty doc. - if (CPMaxRange(aRange) >= [self numberOfGlyphs]) + if (CPMaxRange(aRange) > [self numberOfGlyphs]) aRange = CPMakeRange([self numberOfGlyphs] - 1, 1); var fragments = _objectsInRange(_lineFragments, aRange), @@ -1370,4 +1370,4 @@ var _objectsInRange = function(aList, aRange) "\n\t_attributes="+[_attributes description]; } -@end \ No newline at end of file +@end