From d641cc5057264c97fc76c0656a4b18f04f377cea Mon Sep 17 00:00:00 2001 From: daboe01 Date: Thu, 14 Aug 2014 00:12:02 +0200 Subject: [PATCH] fix fussy optimization --- AppKit/CPTextView/CPTextStorage.j | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextStorage.j b/AppKit/CPTextView/CPTextStorage.j index 447a14f10..2d5e9171d 100755 --- a/AppKit/CPTextView/CPTextStorage.j +++ b/AppKit/CPTextView/CPTextStorage.j @@ -199,7 +199,10 @@ CPTextStorageDidProcessEditingNotification = @"CPTextStorageDidProcessEditingNot _changeInLength += lengthChange; aRange.length += lengthChange; - _editedRange.location == CPNotFound ? aRange : CPUnionRange(_editedRange,aRange); + if (_editedRange.location == CPNotFound) + _editedRange = aRange; + else + _editedRange = CPUnionRange(_editedRange,aRange); } }