From 4a44b35ea5b85b4dfe4b464d4bdc459ad73b5f63 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Fri, 18 Apr 2014 17:17:01 +0200 Subject: [PATCH] fix relayouting optimization bug --- AppKit/CPTextView/CPLayoutManager.j | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AppKit/CPTextView/CPLayoutManager.j b/AppKit/CPTextView/CPLayoutManager.j index f5fd4a2d5..9653671b2 100755 --- a/AppKit/CPTextView/CPLayoutManager.j +++ b/AppKit/CPTextView/CPLayoutManager.j @@ -675,6 +675,9 @@ var _objectsInRange = function(aList, aRange) oldLength = CPMaxRange([_lineFragmentsForRescue lastObject]._range), newLength = [[_textStorage string].length]; + if(ABS(newLength - oldLength) > 1) + return NO; + if (![oldLineFragment isVisuallyIdenticalToFragment: newLineFragment]) { isIdentical = NO;