From 7dcec9afcfb51661c30329136fe7988f0a3abb3e Mon Sep 17 00:00:00 2001 From: daboe01 Date: Wed, 14 Sep 2016 22:20:33 +0200 Subject: [PATCH] fixed: infinite loop due to undo edge case --- AppKit/CPTextView/CPLayoutManager.j | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AppKit/CPTextView/CPLayoutManager.j b/AppKit/CPTextView/CPLayoutManager.j index 3385c6a55..99d403be3 100644 --- a/AppKit/CPTextView/CPLayoutManager.j +++ b/AppKit/CPTextView/CPLayoutManager.j @@ -1158,6 +1158,9 @@ var _objectsInRange = function(aList, aRange) run = {_range:CPMakeRangeCopy(effectiveRange), color:color, font:font, elem:nil, string:string}; _runs.push(run); + + if (!CPMaxRange(effectiveRange)) + break; } }