fix selecting last newline error

This commit is contained in:
daboe01
2014-07-31 20:35:29 +02:00
parent 9cf8ec5dd7
commit 7cbb103376
+1 -1
View File
@@ -905,7 +905,7 @@ var _objectsInRange = function(aList, aRange)
// this allows clicking before and after the (invisible) return character
if (point.x > CGRectGetMaxX(lastFrame) && fragment.length > 0 &&
[[_textStorage string] characterAtIndex: nlLoc] === '\n' || i === c - 1)
[[_textStorage string] characterAtIndex: nlLoc] === '\n')
return nlLoc + 1;
else if (point.x <= CGRectGetMinX(firstFrame))
return fragment._range.location;