From 5f0be0cc7fdef791eb268dc38d60a9bdcf9decd6 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Thu, 14 Aug 2014 14:14:49 +0200 Subject: [PATCH] make storage length zero more tolerant --- AppKit/CPTextView/CPTextView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 6615b96f2..a9bd30a98 100755 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -636,7 +636,7 @@ var kDelegateRespondsTo_textShouldBeginEditing { var textStorageLength = [_layoutManager numberOfCharacters]; - if (textStorageLength === 0) + if (!textStorageLength) return CPMakeRange(0, 0); if (proposedRange.location >= textStorageLength)