fixed: wrapping issue when dragging last word

This commit is contained in:
daboe01 committed 2016-10-01 19:56:35 +02:00
1 parent 47688bf016
commit e0d42962e7
1 file changed
+2 -2
+2 -2
View File
@@ -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
@end