diff --git a/Headers/gnustep/gui/NSTextStorage.h b/Headers/gnustep/gui/NSTextStorage.h index 0cf69bf0b..70dc57bcb 100644 --- a/Headers/gnustep/gui/NSTextStorage.h +++ b/Headers/gnustep/gui/NSTextStorage.h @@ -117,6 +117,12 @@ enum - (void) setDelegate: (id)delegate; - (id) delegate; +#ifndef STRICT_OPENSTEP +- (void) ensureAttributesAreFixedInRange: (NSRange)range; +- (BOOL) fixesAttributesLazily; +- (void) invalidateAttributesInRange: (NSRange)range; +#endif + @end diff --git a/Source/NSTextStorage.m b/Source/NSTextStorage.m index a88b780df..988864bcd 100644 --- a/Source/NSTextStorage.m +++ b/Source/NSTextStorage.m @@ -207,7 +207,7 @@ static Class concrete; As a consequence, if any attribute has been fixed, r != editedRange after this call. This is why we saved r in the first place. */ - [self fixAttributesInRange: r]; + [self invalidateAttributesInRange: r]; [nc postNotificationName: NSTextStorageDidProcessEditingNotification object: self]; @@ -282,15 +282,19 @@ static Class concrete; return _delegate; } +- (void) ensureAttributesAreFixedInRange: (NSRange)range +{ + // Do nothing as the default is not lazy fixing, so all is done already +} + +- (BOOL) fixesAttributesLazily +{ + return NO; +} + +- (void) invalidateAttributesInRange: (NSRange)range +{ + [self fixAttributesInRange: range]; +} + @end - - -/* - * Notifications - */ - -NSString *NSTextStorageWillProcessEditingNotification = - @"NSTextStorageWillProcessEditingNotification"; -NSString *NSTextStorageDidProcessEditingNotification = - @"NSTextStorageDidProcessEditingNotification"; -