From 7cbb10337656d5f96edbb6f11ff26bfab4897f09 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Thu, 31 Jul 2014 20:35:29 +0200 Subject: [PATCH] fix selecting last newline error --- AppKit/CPTextView/CPLayoutManager.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPLayoutManager.j b/AppKit/CPTextView/CPLayoutManager.j index adb706e1e..27d58332a 100755 --- a/AppKit/CPTextView/CPLayoutManager.j +++ b/AppKit/CPTextView/CPLayoutManager.j @@ -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;