From 64720d2a5e24f60ab1564a775e5b933b9b292e30 Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Thu, 30 Aug 2001 20:14:50 +0000 Subject: [PATCH] Indentation tidyup git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10817 72102866-910b-0410-8b05-ffd578937521 --- Source/GSSimpleLayoutManager.m | 10 ++++++---- Source/NSTextStorage.m | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/GSSimpleLayoutManager.m b/Source/GSSimpleLayoutManager.m index 2d4e67bce..e6736f0f2 100644 --- a/Source/GSSimpleLayoutManager.m +++ b/Source/GSSimpleLayoutManager.m @@ -555,10 +555,12 @@ forStartOfGlyphRange: (NSRange)glyphRange - (NSSize) _sizeOfRange: (NSRange)aRange { - if (!aRange.length || _textStorage == nil || - NSMaxRange(aRange) > [_textStorage length]) - return NSZeroSize; - + if (aRange.length == 0 || _textStorage == nil + || NSMaxRange(aRange) > [_textStorage length]) + { + return NSZeroSize; + } + return [_textStorage sizeRange: aRange]; } diff --git a/Source/NSTextStorage.m b/Source/NSTextStorage.m index 7500c8e3b..a88b780df 100644 --- a/Source/NSTextStorage.m +++ b/Source/NSTextStorage.m @@ -196,8 +196,10 @@ static Class concrete; length = [self length]; // Multiple adds at the end might give a too long result if (NSMaxRange(r) > length) + { r.length = length - r.location; - + } + /* The following call will potentially fix attributes. These changes are done through NSTextStorage methods, which records the changes by calling edited:range:changeInLength: - which modifies editedRange.